3v4l.org

run code in 500+ PHP versions simultaneously
<?php class x { static function foo() { echo __METHOD__.PHP_EOL;} } ['x', 'foo'](); [0 => 'x', 1 => 'foo'](); //Array callback has to contain indices 0 and 1 //[10 => 'x', 11 => 'foo'](); //Array callback must have exactly two elements //[10 => 'x', 11 => 'foo', 0 =>0, 1=>1](); // OK! [1 => 'foo', 0 => 'x']();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/49TcN
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   INIT_DYNAMIC_CALL                                            <array>
          1        DO_FCALL                                          0          
    8     2        INIT_DYNAMIC_CALL                                            <array>
          3        DO_FCALL                                          0          
   15     4        INIT_DYNAMIC_CALL                                            <array>
          5        DO_FCALL                                          0          
          6      > RETURN                                                       1

Class x:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/49TcN
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                         'x%3A%3Afoo%0A'
          1      > RETURN                                                       null

End of function foo

End of class x.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
136.39 ms | 1463 KiB | 13 Q