3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); class a { function a() { echo "CONSTRUCTOR CALLED\r\n"; } function b($var) { return $var . 'x'; } } class c { static function w() { echo "w".$PHP_EOL; } } $cc = new C(); c.w(); //print_r(array_map(array('a', 'b'), array('a', 'b')));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3XtC4
function name:  (null)
number of ops:  12
compiled vars:  !0 = $cc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                                 
   22     3        NEW                                              $2      'C'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   23     6        FETCH_CONSTANT                                   ~5      'c'
          7        INIT_FCALL_BY_NAME                                       'w'
          8        DO_FCALL                                      0  $6      
          9        CONCAT                                           ~7      ~5, $6
         10        FREE                                                     ~7
   25    11      > RETURN                                                   1

Class a:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3XtC4
function name:  a
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'CONSTRUCTOR+CALLED%0D%0A'
    8     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/3XtC4
function name:  b
number of ops:  4
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        CONCAT                                           ~1      !0, 'x'
          2      > RETURN                                                   ~1
   12     3*     > RETURN                                                   null

End of function b

End of class a.

Class c:
Function w:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3XtC4
function name:  w
number of ops:  3
compiled vars:  !0 = $PHP_EOL
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   CONCAT                                           ~1      'w', !0
          1        ECHO                                                     ~1
   19     2      > RETURN                                                   null

End of function w

End of class c.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.61 ms | 1396 KiB | 15 Q