3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(json_encode(["foo" => chr(132), "bar" => "bar"]), json_last_error()); var_dump(json_encode(["foo" => chr(132), "bar" => "bar"], JSON_PARTIAL_OUTPUT_ON_ERROR));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5TuSU
function name:  (null)
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'json_encode'
          2        INIT_ARRAY                                       ~0      '%84', 'foo'
          3        ADD_ARRAY_ELEMENT                                ~0      'bar', 'bar'
          4        SEND_VAL                                                 ~0
          5        DO_ICALL                                         $1      
          6        SEND_VAR                                                 $1
          7        INIT_FCALL                                               'json_last_error'
          8        DO_ICALL                                         $2      
          9        SEND_VAR                                                 $2
         10        DO_ICALL                                                 
    4    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'json_encode'
         13        INIT_ARRAY                                       ~4      '%84', 'foo'
         14        ADD_ARRAY_ELEMENT                                ~4      'bar', 'bar'
         15        SEND_VAL                                                 ~4
         16        SEND_VAL                                                 512
         17        DO_ICALL                                         $5      
         18        SEND_VAR                                                 $5
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
200.72 ms | 1395 KiB | 19 Q