3v4l.org

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

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5Uq7S
function name:  __construct
number of ops:  7
compiled vars:  !0 = $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  ~3      'You+sent+me+'
          3        ROPE_ADD                                      1  ~3      ~3, !0
          4        ROPE_END                                      2  ~2      ~3, '%0A'
          5        ECHO                                                     ~2
    6     6      > RETURN                                                   null

End of function __construct

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.97 ms | 1396 KiB | 15 Q