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));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MXh7l
function name:  (null)
number of ops:  28
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_FCALL                                               'utf8_encode'
          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        INIT_FCALL                                               'json_last_error'
         11        DO_ICALL                                         $3      
         12        IS_IDENTICAL                                     ~4      $3, 5
         13        SEND_VAL                                                 ~4
         14        DO_ICALL                                                 
    4    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'json_encode'
         17        INIT_FCALL                                               'utf8_encode'
         18        SEND_VAL                                                 '%C3%A8'
         19        DO_ICALL                                         $6      
         20        INIT_ARRAY                                       ~7      $6, 'foo'
         21        ADD_ARRAY_ELEMENT                                ~7      'bar', 'bar'
         22        SEND_VAL                                                 ~7
         23        SEND_VAL                                                 512
         24        DO_ICALL                                         $8      
         25        SEND_VAR                                                 $8
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.21 ms | 1395 KiB | 21 Q