3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function __construct($b){ ++$b; echo "You sent me $x\n"; } } $o = new Test($b=8); var_dump($b == $GLOBALS['b']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WaoGi
function name:  (null)
number of ops:  12
compiled vars:  !0 = $o, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'Test'
          1        ASSIGN                                           ~3      !1, 8
          2        SEND_VAL_EX                                              ~3
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
    9     5        INIT_FCALL                                               'var_dump'
          6        FETCH_R                      global              ~6      'GLOBALS'
          7        FETCH_DIM_R                                      ~7      ~6, 'b'
          8        IS_EQUAL                                         ~8      !1, ~7
          9        SEND_VAL                                                 ~8
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WaoGi
function name:  __construct
number of ops:  7
compiled vars:  !0 = $b, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        PRE_INC                                                  !0
    5     2        ROPE_INIT                                     3  ~4      'You+sent+me+'
          3        ROPE_ADD                                      1  ~4      ~4, !1
          4        ROPE_END                                      2  ~3      ~4, '%0A'
          5        ECHO                                                     ~3
    6     6      > RETURN                                                   null

End of function __construct

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.44 ms | 1395 KiB | 15 Q