3v4l.org

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

End of function dostuff

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.41 ms | 1395 KiB | 15 Q