3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = []; var_dump(count($arr)); // will work as expected $a = count(json_decode('{}', true)); var_dump($a); // will throw an error $b = count(json_decode('{}')); var_dump($b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4JF9V
function name:  (null)
number of ops:  23
compiled vars:  !0 = $arr, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'var_dump'
          2        COUNT                                            ~4      !0
          3        SEND_VAL                                                 ~4
          4        DO_ICALL                                                 
    8     5        INIT_FCALL                                               'json_decode'
          6        SEND_VAL                                                 '%7B%7D'
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $6      
          9        COUNT                                            ~7      $6
         10        ASSIGN                                                   !1, ~7
    9    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
   13    14        INIT_FCALL                                               'json_decode'
         15        SEND_VAL                                                 '%7B%7D'
         16        DO_ICALL                                         $10     
         17        COUNT                                            ~11     $10
         18        ASSIGN                                                   !2, ~11
   14    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.1 ms | 1433 KiB | 15 Q