3v4l.org

run code in 300+ PHP versions simultaneously
<?php $checkme = ''; json_decode($checkme); if (json_last_error() === JSON_ERROR_NONE){ echo "No error."; }else{ echo "error detected of : " . json_last_error() . " " . json_last_error_msg(); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0MCkJ
function name:  (null)
number of ops:  19
compiled vars:  !0 = $checkme
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, ''
    4     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    5     4        INIT_FCALL                                               'json_last_error'
          5        DO_ICALL                                         $3      
          6        IS_IDENTICAL                                             $3, 0
          7      > JMPZ                                                     ~4, ->10
    6     8    >   ECHO                                                     'No+error.'
          9      > JMP                                                      ->18
    8    10    >   INIT_FCALL                                               'json_last_error'
         11        DO_ICALL                                         $5      
         12        CONCAT                                           ~6      'error+detected+of+%3A+', $5
         13        CONCAT                                           ~7      ~6, '+'
         14        INIT_FCALL                                               'json_last_error_msg'
         15        DO_ICALL                                         $8      
         16        CONCAT                                           ~9      ~7, $8
         17        ECHO                                                     ~9
    9    18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.92 ms | 1399 KiB | 19 Q