3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $secretProperty = "Hello"; private function secretMethod() { return 'World'; } } $foo = new Foo(); $bar = (array) $foo; var_dump($bar); echo $bar['secretProperty'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JNoLA
function name:  (null)
number of ops:  11
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   12     3        CAST                                          7  ~5      !0
          4        ASSIGN                                                   !1, ~5
   13     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   14     8        FETCH_DIM_R                                      ~8      !1, 'secretProperty'
          9        ECHO                                                     ~8
         10      > RETURN                                                   1

Class Foo:
Function secretmethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JNoLA
function name:  secretMethod
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   'World'
    8     1*     > RETURN                                                   null

End of function secretmethod

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.96 ms | 1394 KiB | 15 Q