3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = 'barValue'; protected $baz = 'bazValue'; private $tab = 'tabValue'; } $data = (array) new Foo(); var_dump(explode(chr(ord("\x00")), "\0Foo\0tab")); var_dump($data["bar"]); var_dump($data["\0*\0baz"]); var_dump($data["\0Foo\0tab"]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pKKsD
function name:  (null)
number of ops:  27
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        CAST                                          7  ~3      $1
          3        ASSIGN                                                   !0, ~3
   11     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'explode'
          6        INIT_FCALL                                               'chr'
          7        SEND_VAL                                                 0
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        SEND_VAL                                                 '%00Foo%00tab'
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
   13    14        INIT_FCALL                                               'var_dump'
         15        FETCH_DIM_R                                      ~8      !0, 'bar'
         16        SEND_VAL                                                 ~8
         17        DO_ICALL                                                 
   14    18        INIT_FCALL                                               'var_dump'
         19        FETCH_DIM_R                                      ~10     !0, '%00%2A%00baz'
         20        SEND_VAL                                                 ~10
         21        DO_ICALL                                                 
   15    22        INIT_FCALL                                               'var_dump'
         23        FETCH_DIM_R                                      ~12     !0, '%00Foo%00tab'
         24        SEND_VAL                                                 ~12
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.54 ms | 1395 KiB | 19 Q