3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = (object)[false]; var_dump($x); $x->{0} = true; var_dump($x); $x = (array)$x; var_dump($x); echo json_encode(current($x));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aRBnl
function name:  (null)
number of ops:  23
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   CAST                                          8  ~1      <array>
          1        ASSIGN                                                   !0, ~1
    3     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    4     5        ASSIGN_OBJ                                               !0, '0'
          6        OP_DATA                                                  <true>
    5     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    6    10        CAST                                          7  ~6      !0
         11        ASSIGN                                                   !0, ~6
    7    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
    8    15        INIT_FCALL                                               'json_encode'
         16        INIT_FCALL                                               'current'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $9      
         19        SEND_VAR                                                 $9
         20        DO_ICALL                                         $10     
         21        ECHO                                                     $10
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.66 ms | 1395 KiB | 19 Q