3v4l.org

run code in 300+ PHP versions simultaneously
<?php function lint($code) { $code = strpos($code, '<?php') === 0 ? $code : "<?php $code"; $filename = tempnam(sys_get_temp_dir(), 'lnt'); file_put_contents($filename, $code); exec(PHP_BINARY . " -l $filename", $errors); return $errors; } print_r( lint('echo "world"; } ') );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q8UvF
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'lint'
          2        SEND_VAL                                                 'echo+%22world%22%3B+%7D+'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function lint:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q8UvF
function name:  lint
number of ops:  33
compiled vars:  !0 = $code, !1 = $filename, !2 = $errors
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%3C%3Fphp'
          4        DO_ICALL                                         $3      
          5        IS_IDENTICAL                                             $3, 0
          6      > JMPZ                                                     ~4, ->9
          7    >   QM_ASSIGN                                        ~5      !0
          8      > JMP                                                      ->12
          9    >   NOP                                                      
         10        FAST_CONCAT                                      ~6      '%3C%3Fphp+', !0
         11        QM_ASSIGN                                        ~5      ~6
         12    >   ASSIGN                                                   !0, ~5
    5    13        INIT_FCALL                                               'tempnam'
         14        INIT_FCALL                                               'sys_get_temp_dir'
         15        DO_ICALL                                         $8      
         16        SEND_VAR                                                 $8
         17        SEND_VAL                                                 'lnt'
         18        DO_ICALL                                         $9      
         19        ASSIGN                                                   !1, $9
    6    20        INIT_FCALL                                               'file_put_contents'
         21        SEND_VAR                                                 !1
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                                 
    7    24        INIT_FCALL                                               'exec'
         25        NOP                                                      
         26        FAST_CONCAT                                      ~12     '+-l+', !1
         27        CONCAT                                           ~13     '%2Fusr%2Fbin%2Fphp-8.0.0', ~12
         28        SEND_VAL                                                 ~13
         29        SEND_REF                                                 !2
         30        DO_ICALL                                                 
    8    31      > RETURN                                                   !2
    9    32*     > RETURN                                                   null

End of function lint

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.58 ms | 1403 KiB | 26 Q