3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ "fruits" => [ "apple" => ["taste" => "sweet", "colour" => "yellow"], "banana" => ["taste" => "sour", "colour" => "green"], "cherry" => ["taste" => "sweet", "color" => "red"] ], "vegetables" => "yuck" ]; $str = json_encode($arr); $decode = json_decode($str, true,4); echo json_last_error_msg();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2TDm7
function name:  (null)
number of ops:  15
compiled vars:  !0 = $arr, !1 = $str, !2 = $decode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'json_encode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   11     5        INIT_FCALL                                               'json_decode'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 <true>
          8        SEND_VAL                                                 4
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
   12    11        INIT_FCALL                                               'json_last_error_msg'
         12        DO_ICALL                                         $8      
         13        ECHO                                                     $8
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
278.43 ms | 1394 KiB | 20 Q