3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Test; class MyTest { private $bar = 42; } $obj = new \Test\MyTest; $propname="\0" . get_class($obj) . "\0bar"; $a = (array) $obj; echo $a[$propname];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fg4bH
function name:  (null)
number of ops:  14
compiled vars:  !0 = $obj, !1 = $propname, !2 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $3      'Test%5CMyTest'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    7     3        INIT_NS_FCALL_BY_NAME                                    'Test%5Cget_class'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $6      
          6        CONCAT                                           ~7      '%00', $6
          7        CONCAT                                           ~8      ~7, '%00bar'
          8        ASSIGN                                                   !1, ~8
    8     9        CAST                                          7  ~10     !0
         10        ASSIGN                                                   !2, ~10
    9    11        FETCH_DIM_R                                      ~12     !2, !1
         12        ECHO                                                     ~12
         13      > RETURN                                                   1

Class Test\MyTest: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.64 ms | 1394 KiB | 15 Q