3v4l.org

run code in 500+ PHP versions simultaneously
<?php $client = (object) ['id' => 1]; // system(id) is removed $databaseValue = '$client->id; system("id")'; preg_match_all('/^\$(?:[a-z]||[A-Z])\S+/', $databaseValue, $matches); if (!empty($matches)) { $firstVariableOccurance = current(current($matches)); eval("\$value = {$firstVariableOccurance};"); echo "Send command {$value}"; }

preferences:
72.86 ms | 1236 KiB | 5 Q