<?php $authList = []; $command = ''; $condition = '$condition=(' . $command . ');'; @eval($condition); $condition && $authList[] = strtolower('ABC'); print_r($authList);