3v4l.org

run code in 300+ PHP versions simultaneously
<?php $structure = array( 'id' => 11231, 'message' => "Hello!", 'num_str' => "3", 'num_int' => 3, 'num_float' => 3.0, 'num_big' => 2123123154123341223341562341238712389712331123231123123123121331231, ); $options = 0; if (version_compare(PHP_VERSION, '5.4.0') >= 0) { $options = $options | JSON_PRETTY_PRINT; } var_dump(json_encode($structure, $options));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/bldmb
function name:  (null)
number of ops:  18
compiled vars:  !0 = $structure, !1 = $options
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        ASSIGN                                                   !1, 0
   14     2        INIT_FCALL                                               'version_compare'
          3        SEND_VAL                                                 '8.0.0'
          4        SEND_VAL                                                 '5.4.0'
          5        DO_ICALL                                         $4      
          6        IS_SMALLER_OR_EQUAL                                      0, $4
          7      > JMPZ                                                     ~5, ->10
   15     8    >   BW_OR                                            ~6      !1, 128
          9        ASSIGN                                                   !1, ~6
   18    10    >   INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'json_encode'
         12        SEND_VAR                                                 !0
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $8      
         15        SEND_VAR                                                 $8
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.34 ms | 1394 KiB | 19 Q