3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() { var_dump(($a = 'strlen')('123')); (function() { var_dump('baz'); })(333); } } (new Foo())->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B6Lh8
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $0      'Foo'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'bar'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FB6Lh8%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B6Lh8
function name:  {closure}
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'baz'
          2        DO_ICALL                                                 
          3      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FB6Lh8%3A6%240

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B6Lh8
function name:  bar
number of ops:  12
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        ASSIGN                                           ~1      !0, 'strlen'
          2        INIT_DYNAMIC_CALL                                        ~1
          3        SEND_VAL_EX                                              '123'
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
    6     7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FB6Lh8%3A6%240'
          8        INIT_DYNAMIC_CALL                                        ~4
          9        SEND_VAL_EX                                              333
         10        DO_FCALL                                      0          
    7    11      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.66 ms | 1387 KiB | 15 Q