3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.8 ms | 1394 KiB | 17 Q