3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1, null , false, true, 'test', array(), new stdClass()); $json = json_encode($a); var_dump($json, json_decode($json));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AJoUp
function name:  (null)
number of ops:  22
compiled vars:  !0 = $a, !1 = $json
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_ARRAY                                       ~2      1
          1        ADD_ARRAY_ELEMENT                                ~2      null
          2        ADD_ARRAY_ELEMENT                                ~2      <false>
          3        ADD_ARRAY_ELEMENT                                ~2      <true>
          4        ADD_ARRAY_ELEMENT                                ~2      'test'
          5        ADD_ARRAY_ELEMENT                                ~2      <array>
          6        NEW                                              $3      'stdClass'
          7        DO_FCALL                                      0          
          8        ADD_ARRAY_ELEMENT                                ~2      $3
          9        ASSIGN                                                   !0, ~2
    3    10        INIT_FCALL                                               'json_encode'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        ASSIGN                                                   !1, $6
    4    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        INIT_FCALL                                               'json_decode'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $8      
         19        SEND_VAR                                                 $8
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.77 ms | 1395 KiB | 19 Q