3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple"); function test(&$item, $key) { if($item == 'orange') return false; return true; } array_ашдеук($fruits, 'test'); var_dump($fruits);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2M833
function name:  (null)
number of ops:  9
compiled vars:  !0 = $fruits
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        INIT_FCALL_BY_NAME                                       'array_%D0%B0%D1%88%D0%B4%D0%B5%D1%83%D0%BA'
          2        SEND_VAR_EX                                              !0
          3        SEND_VAL_EX                                              'test'
          4        DO_FCALL                                      0          
   15     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2M833
function name:  test
number of ops:  7
compiled vars:  !0 = $item, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        IS_EQUAL                                                 !0, 'orange'
          3      > JMPZ                                                     ~2, ->5
    8     4    > > RETURN                                                   <false>
   10     5    > > RETURN                                                   <true>
   11     6*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.53 ms | 1395 KiB | 15 Q