3v4l.org

run code in 500+ PHP versions simultaneously
<?php $check = DB::table('user')->where('id', $id)->value('Command'); $databaseValue = '$client->id'; preg_match_all('/^\$([a-z]||[A-Z])\S+/', $databaseValue, $matches); if (!empty($matches)) { $firstVariableOccurance = current(current($matches)); eval("\$value = {$firstVariableOccurance};"); $ex = "{$check}"; dd($ex); } // it return me ^ "status $client->id", i.e. the variable is not executed
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 36
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
filename:       /in/IFcrC
function name:  (null)
number of ops:  37
compiled vars:  !0 = $check, !1 = $id, !2 = $databaseValue, !3 = $matches, !4 = $firstVariableOccurance, !5 = $ex
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_STATIC_METHOD_CALL                                      'DB', 'table'
          1        SEND_VAL_EX                                                  'user'
          2        DO_FCALL                                          0  $6      
          3        INIT_METHOD_CALL                                             $6, 'where'
          4        SEND_VAL_EX                                                  'id'
          5        SEND_VAR_EX                                                  !1
          6        DO_FCALL                                          0  $7      
          7        INIT_METHOD_CALL                                             $7, 'value'
          8        SEND_VAL_EX                                                  'Command'
          9        DO_FCALL                                          0  $8      
         10        ASSIGN                                                       !0, $8
    4    11        ASSIGN                                                       !2, '%24client-%3Eid'
    5    12        INIT_FCALL                                                   'preg_match_all'
         13        SEND_VAL                                                     '%2F%5E%5C%24%28%5Ba-z%5D%7C%7C%5BA-Z%5D%29%5CS%2B%2F'
         14        SEND_VAR                                                     !2
         15        SEND_REF                                                     !3
         16        DO_ICALL                                                     
    6    17        ISSET_ISEMPTY_CV                                     ~12     !3
         18        BOOL_NOT                                             ~13     ~12
         19      > JMPZ                                                         ~13, ->36
    7    20    >   INIT_FCALL                                                   'current'
         21        INIT_FCALL                                                   'current'
         22        SEND_VAR                                                     !3
         23        DO_ICALL                                             $14     
         24        SEND_VAR                                                     $14
         25        DO_ICALL                                             $15     
         26        ASSIGN                                                       !4, $15
    8    27        ROPE_INIT                                         3  ~18     '%24value+%3D+'
         28        ROPE_ADD                                          1  ~18     ~18, !4
         29        ROPE_END                                          2  ~17     ~18, '%3B'
         30        INCLUDE_OR_EVAL                                              ~17, EVAL
    9    31        CAST                                              6  ~21     !0
         32        ASSIGN                                                       !5, ~21
   10    33        INIT_FCALL_BY_NAME                                           'dd'
         34        SEND_VAR_EX                                                  !5
         35        DO_FCALL                                          0          
   12    36    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.86 ms | 1888 KiB | 14 Q