3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { static $something = 'yes'; public static function doStuff($var = false) { if($var) { return 'no'; } return $this->something; } } 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/lA56j
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                                                 <false>
          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                                                 <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/lA56j
function name:  doStuff
number of ops:  7
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      <false>
    6     1      > JMPZ                                                     !0, ->3
    7     2    > > RETURN                                                   'no'
    9     3    >   FETCH_THIS                                       $1      
          4        FETCH_OBJ_R                                      ~2      $1, 'something'
          5      > RETURN                                                   ~2
   10     6*     > RETURN                                                   null

End of function dostuff

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.16 ms | 1387 KiB | 15 Q