3v4l.org

run code in 300+ PHP versions simultaneously
<?php //var_dump(json_encode(array("foo" => utf8_encode('è'), "bar" => "bar")), json_last_error() === JSON_ERROR_UTF8); //var_dump(json_encode(array("foo" => utf8_encode('è'), "bar" => "bar"), JSON_PARTIAL_OUTPUT_ON_ERROR)); var_dump(json_encode(array("foo" => utf8_decode('è'), "bar" => "bar")));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qp3tC
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'json_encode'
          2        INIT_FCALL                                               'utf8_decode'
          3        SEND_VAL                                                 '%C3%A8'
          4        DO_ICALL                                         $0      
          5        INIT_ARRAY                                       ~1      $0, 'foo'
          6        ADD_ARRAY_ELEMENT                                ~1      'bar', 'bar'
          7        SEND_VAL                                                 ~1
          8        DO_ICALL                                         $2      
          9        SEND_VAR                                                 $2
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.91 ms | 1398 KiB | 19 Q