3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public $x = 1; // access modifiers effect property/method visibility not scope protected $y = 2; private $z = 3; } $o = new Test(); function TryIt(){ class Testr { public $x = 24; // access modifiers effect property/method visibility not scope protected $y = 28; private $z = 30; } } $r = new TryIt(); var_dump($GLOBALS);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dgGue
function name:  (null)
number of ops:  11
compiled vars:  !0 = $o, !1 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $2      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   17     3        NEW                                              $5      'TryIt'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   18     6        INIT_FCALL                                               'var_dump'
          7        FETCH_R                      global              ~8      'GLOBALS'
          8        SEND_VAL                                                 ~8
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

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

End of function tryit

Class Test: [no user functions]
Class Testr: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.89 ms | 1394 KiB | 15 Q