3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function doStuff($var = false) { if($var) { return 'no'; } return $this->something(); } public static function something() { return 'yes'; } } var_dump(A::doStuff(true)); var_dump(A::doStuff(false));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/McjcX
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'A', 'doStuff'
          2        SEND_VAL                                                 <true>
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   14     6        INIT_FCALL                                               'var_dump'
          7        INIT_STATIC_METHOD_CALL                                  'A', 'doStuff'
          8        SEND_VAL                                                 <false>
          9        DO_FCALL                                      0  $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class A:
Function dostuff:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 3
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/McjcX
function name:  doStuff
number of ops:  8
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      <false>
    5     1      > JMPZ                                                     !0, ->3
    6     2    > > RETURN                                                   'no'
    8     3    >   FETCH_THIS                                       $1      
          4        INIT_METHOD_CALL                                         $1, 'something'
          5        DO_FCALL                                      0  $2      
          6      > RETURN                                                   $2
    9     7*     > RETURN                                                   null

End of function dostuff

Function something:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/McjcX
function name:  something
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   'yes'
          1*     > RETURN                                                   null

End of function something

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.9 ms | 1388 KiB | 15 Q