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('/(?:\s|^)\$(?:[^\s]+?)(?:[a-z])+(?:->|$)?(?:[a-z]|[A-Z])+/', $databaseValue, $matches); if (!empty($matches)) { $firstVariableOccurance = current(current($matches)); eval("\$value = {$firstVariableOccurance};"); echo "Send command {$value}"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 25
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/JfHGC
function name:  (null)
number of ops:  26
compiled vars:  !0 = $client, !1 = $databaseValue, !2 = $matches, !3 = $firstVariableOccurance, !4 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   CAST                                              8  ~5      <array>
          1        ASSIGN                                                       !0, ~5
    6     2        ASSIGN                                                       !1, '%24client-%3Eid%3B+system%28%22id%22%29'
    8     3        INIT_FCALL                                                   'preg_match_all'
          4        SEND_VAL                                                     '%2F%28%3F%3A%5Cs%7C%5E%29%5C%24%28%3F%3A%5B%5E%5Cs%5D%2B%3F%29%28%3F%3A%5Ba-z%5D%29%2B%28%3F%3A-%3E%7C%24%29%3F%28%3F%3A%5Ba-z%5D%7C%5BA-Z%5D%29%2B%2F'
          5        SEND_VAR                                                     !1
          6        SEND_REF                                                     !2
          7        DO_ICALL                                                     
   10     8        ISSET_ISEMPTY_CV                                     ~9      !2
          9        BOOL_NOT                                             ~10     ~9
         10      > JMPZ                                                         ~10, ->25
   11    11    >   INIT_FCALL                                                   'current'
         12        INIT_FCALL                                                   'current'
         13        SEND_VAR                                                     !2
         14        DO_ICALL                                             $11     
         15        SEND_VAR                                                     $11
         16        DO_ICALL                                             $12     
         17        ASSIGN                                                       !3, $12
   12    18        ROPE_INIT                                         3  ~15     '%24value+%3D+'
         19        ROPE_ADD                                          1  ~15     ~15, !3
         20        ROPE_END                                          2  ~14     ~15, '%3B'
         21        INCLUDE_OR_EVAL                                              ~14, EVAL
   13    22        NOP                                                          
         23        FAST_CONCAT                                          ~18     'Send+command+', !4
         24        ECHO                                                         ~18
   14    25    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.58 ms | 1859 KiB | 14 Q