3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = array('', ' ', 'TRUE', ' true '); foreach ($values as $val) { var_dump(json_decode($val)); var_dump(json_last_error()); var_dump(PHP_VERSION_ID >= 50500 ? json_last_error_msg() : NULL); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 24
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 24
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/R5T5c
function name:  (null)
number of ops:  26
compiled vars:  !0 = $values, !1 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1      > FE_RESET_R                                       $3      !0, ->24
          2    > > FE_FETCH_R                                               $3, !1, ->24
    4     3    >   INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'json_decode'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
    5     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'json_last_error'
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
    6    14        INIT_FCALL                                               'var_dump'
         15      > JMPZ                                                     <true>, ->20
         16    >   INIT_FCALL                                               'json_last_error_msg'
         17        DO_ICALL                                         $8      
         18        QM_ASSIGN                                        ~9      $8
         19      > JMP                                                      ->21
         20    >   QM_ASSIGN                                        ~9      null
         21    >   SEND_VAL                                                 ~9
         22        DO_ICALL                                                 
    3    23      > JMP                                                      ->2
         24    >   FE_FREE                                                  $3
    7    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.32 ms | 1396 KiB | 21 Q