3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); class a { function x() { echo "asdasd\n"; } function a() { echo "CONSTRUCTOR CALLED\r\n"; } function b($var) { self::x(); return $var . 'x'; } } print_r(array_map(array('a', 'b'), array('a', 'b'))); print_r(a::b('y'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YhCEP
function name:  (null)
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                                 
   17     3        INIT_FCALL                                               'print_r'
          4        INIT_FCALL                                               'array_map'
          5        SEND_VAL                                                 <array>
          6        SEND_VAL                                                 <array>
          7        DO_ICALL                                         $1      
          8        SEND_VAR                                                 $1
          9        DO_ICALL                                                 
   18    10        INIT_FCALL                                               'print_r'
         11        INIT_STATIC_METHOD_CALL                                  'a', 'b'
         12        SEND_VAL                                                 'y'
         13        DO_FCALL                                      0  $3      
         14        SEND_VAR                                                 $3
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

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

End of function x

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YhCEP
function name:  a
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                     'CONSTRUCTOR+CALLED%0D%0A'
    9     1      > RETURN                                                   null

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YhCEP
function name:  b
number of ops:  6
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        INIT_STATIC_METHOD_CALL                                  'x'
          2        DO_FCALL                                      0          
   13     3        CONCAT                                           ~2      !0, 'x'
          4      > RETURN                                                   ~2
   14     5*     > RETURN                                                   null

End of function b

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.71 ms | 1396 KiB | 19 Q