3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "\xB1\x31"; $json = json_encode(array(21, 'ok', $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/5HIQn
function name:  (null)
number of ops:  17
compiled vars:  !0 = $text, !1 = $json, !2 = $error
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%B11'
    4     1        INIT_FCALL                                               'json_encode'
          2        INIT_ARRAY                                       ~4      21
          3        ADD_ARRAY_ELEMENT                                ~4      'ok'
          4        ADD_ARRAY_ELEMENT                                ~4      !0
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    5     8        INIT_FCALL                                               'json_last_error'
          9        DO_ICALL                                         $7      
         10        ASSIGN                                                   !2, $7
    7    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        IS_IDENTICAL                                     ~9      !2, 5
         14        SEND_VAL                                                 ~9
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.56 ms | 1399 KiB | 19 Q