3v4l.org

run code in 300+ PHP versions simultaneously
<?php $item = [ 'id' => '123' ]; $item2 = [ 'id' => '000' ]; $counts = [ '111' => true, '123' => true, '234' => true, '345' => true, '456' => true, '567' => true, ]; var_dump($count[$item['id']] ?? null); var_dump($count[$item2['id']] ?? null);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nWRXS
function name:  (null)
number of ops:  18
compiled vars:  !0 = $item, !1 = $item2, !2 = $counts, !3 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1        ASSIGN                                                   !1, <array>
   12     2        ASSIGN                                                   !2, <array>
   22     3        INIT_FCALL                                               'var_dump'
          4        FETCH_DIM_R                                      ~7      !0, 'id'
          5        FETCH_DIM_IS                                     ~8      !3, ~7
          6        COALESCE                                         ~9      ~8
          7        QM_ASSIGN                                        ~9      null
          8        SEND_VAL                                                 ~9
          9        DO_ICALL                                                 
   23    10        INIT_FCALL                                               'var_dump'
         11        FETCH_DIM_R                                      ~11     !1, 'id'
         12        FETCH_DIM_IS                                     ~12     !3, ~11
         13        COALESCE                                         ~13     ~12
         14        QM_ASSIGN                                        ~13     null
         15        SEND_VAL                                                 ~13
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.66 ms | 1394 KiB | 15 Q