3v4l.org

run code in 500+ PHP versions simultaneously
<?php var_dump(json_encode(array("foo" => chr(132), "bar" => "bar")), json_last_error() === JSON_ERROR_UTF8); var_dump(json_encode(array("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/SIlJo
function name:  (null)
number of ops:  22
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        IS_IDENTICAL                                         ~3      $2, 5
         10        SEND_VAL                                                     ~3
         11        DO_ICALL                                                     
    4    12        INIT_FCALL                                                   'var_dump'
         13        INIT_FCALL                                                   'json_encode'
         14        INIT_ARRAY                                           ~5      '%84', 'foo'
         15        ADD_ARRAY_ELEMENT                                    ~5      'bar', 'bar'
         16        SEND_VAL                                                     ~5
         17        SEND_VAL                                                     512
         18        DO_ICALL                                             $6      
         19        SEND_VAR                                                     $6
         20        DO_ICALL                                                     
         21      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.84 ms | 3313 KiB | 16 Q