3v4l.org

run code in 300+ PHP versions simultaneously
<?php $null = json_decode(json_encode(null)); var_dump($null, json_last_error()); $null = json_decode(null); var_dump($null, json_last_error()); $false = json_decode(json_encode(false)); var_dump($false, json_last_error()); $false = json_decode(false); var_dump($false, json_last_error());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Oq7sE
function name:  (null)
number of ops:  47
compiled vars:  !0 = $null, !1 = $false
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'json_decode'
          1        INIT_FCALL                                               'json_encode'
          2        SEND_VAL                                                 null
          3        DO_ICALL                                         $2      
          4        SEND_VAR                                                 $2
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !0, $3
    4     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        INIT_FCALL                                               'json_last_error'
         10        DO_ICALL                                         $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                                 
    6    13        INIT_FCALL                                               'json_decode'
         14        SEND_VAL                                                 null
         15        DO_ICALL                                         $7      
         16        ASSIGN                                                   !0, $7
    7    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !0
         19        INIT_FCALL                                               'json_last_error'
         20        DO_ICALL                                         $9      
         21        SEND_VAR                                                 $9
         22        DO_ICALL                                                 
   10    23        INIT_FCALL                                               'json_decode'
         24        INIT_FCALL                                               'json_encode'
         25        SEND_VAL                                                 <false>
         26        DO_ICALL                                         $11     
         27        SEND_VAR                                                 $11
         28        DO_ICALL                                         $12     
         29        ASSIGN                                                   !1, $12
   11    30        INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !1
         32        INIT_FCALL                                               'json_last_error'
         33        DO_ICALL                                         $14     
         34        SEND_VAR                                                 $14
         35        DO_ICALL                                                 
   13    36        INIT_FCALL                                               'json_decode'
         37        SEND_VAL                                                 <false>
         38        DO_ICALL                                         $16     
         39        ASSIGN                                                   !1, $16
   14    40        INIT_FCALL                                               'var_dump'
         41        SEND_VAR                                                 !1
         42        INIT_FCALL                                               'json_last_error'
         43        DO_ICALL                                         $18     
         44        SEND_VAR                                                 $18
         45        DO_ICALL                                                 
         46      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.67 ms | 1018 KiB | 17 Q