3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = 'barValue'; protected $baz = 'bazValue'; private $biz = 'bizValue'; function test() { echo 'hi'; } } $foo = new Foo(); $arrayFoo = (array) $foo; var_dump($arrayFoo); $out = json_encode($arrayFoo); $out = preg_replace('/\\\u0000[*a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\\u0000/', '', $out); $newArray = json_decode($out, true); var_dump($newArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/34KSQ
function name:  (null)
number of ops:  27
compiled vars:  !0 = $foo, !1 = $arrayFoo, !2 = $out, !3 = $newArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $4      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
   16     3        CAST                                          7  ~7      !0
          4        ASSIGN                                                   !1, ~7
   18     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   19     8        INIT_FCALL                                               'json_encode'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $10     
         11        ASSIGN                                                   !2, $10
   20    12        INIT_FCALL                                               'preg_replace'
         13        SEND_VAL                                                 '%2F%5C%5Cu0000%5B%2Aa-zA-Z_%5Cx7f-%5Cxff%5D%5Ba-zA-Z0-9_%5Cx7f-%5Cxff%5D%2A%5C%5Cu0000%2F'
         14        SEND_VAL                                                 ''
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $12     
         17        ASSIGN                                                   !2, $12
   22    18        INIT_FCALL                                               'json_decode'
         19        SEND_VAR                                                 !2
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $14     
         22        ASSIGN                                                   !3, $14
   23    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !3
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Class Foo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/34KSQ
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     'hi'
   12     1      > RETURN                                                   null

End of function test

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.04 ms | 1396 KiB | 21 Q