3v4l.org

run code in 300+ PHP versions simultaneously
<?php $credits = 1; $energy = 2; $fuel = 3; $upgrade = 4; echo json_encode( array( "fuel" => $fuel, "energy" => $energy, "credits" => $credits, "upgrades" => $upgrade ) ); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OYOWV
function name:  (null)
number of ops:  13
compiled vars:  !0 = $credits, !1 = $energy, !2 = $fuel, !3 = $upgrade
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1
    3     1        ASSIGN                                                   !1, 2
    4     2        ASSIGN                                                   !2, 3
    5     3        ASSIGN                                                   !3, 4
    7     4        INIT_FCALL                                               'json_encode'
    8     5        INIT_ARRAY                                       ~8      !2, 'fuel'
    9     6        ADD_ARRAY_ELEMENT                                ~8      !1, 'energy'
   10     7        ADD_ARRAY_ELEMENT                                ~8      !0, 'credits'
   11     8        ADD_ARRAY_ELEMENT                                ~8      !3, 'upgrades'
          9        SEND_VAL                                                 ~8
         10        DO_ICALL                                         $9      
         11        ECHO                                                     $9
   13    12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.09 ms | 1394 KiB | 15 Q