3v4l.org

run code in 300+ PHP versions simultaneously
<?php // An invalid UTF8 sequence $text = "\xB1\x31"; $json = json_encode($text); $error = json_last_error(); var_dump($json, $error === JSON_ERROR_UTF8);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sMqLP
function name:  (null)
number of ops:  14
compiled vars:  !0 = $text, !1 = $json, !2 = $error
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%B11'
    5     1        INIT_FCALL                                               'json_encode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    6     5        INIT_FCALL                                               'json_last_error'
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
    8     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        IS_IDENTICAL                                     ~8      !2, 5
         11        SEND_VAL                                                 ~8
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.38 ms | 1394 KiB | 19 Q