3v4l.org

run code in 300+ PHP versions simultaneously
<?php $exit_price = [ 0 => 2205, 1 => 6680, 2 => 50351, 3 => 100, 4 => 100, 5 => 1200, 6 => 900, 7 => 234, 8 => 2342, 9 => 45654, 10 => 0, 11 => -1, 12 => 1 ]; $stoploss = [ 0 => null, 1 => null, 2 => null, 3 => null, 4 => null, 5 => null, 6 => 145300, 7 => null, 8 => null, 9 => 12222, 10 => 0, 11 => -1, 12 => 1 ]; $result = array_map(function ($x, $y) { if (null !== $y) { return $x - $y; } return null; }, $exit_price, $stoploss); print_r(array_filter($result, function ($z) { return null !== $z; }));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/foURE
function name:  (null)
number of ops:  18
compiled vars:  !0 = $exit_price, !1 = $stoploss, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   18     1        ASSIGN                                                   !1, <array>
   34     2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
   40     4        SEND_VAL                                                 ~5
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !1
   34     7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !2, $6
   42     9        INIT_FCALL                                               'print_r'
         10        INIT_FCALL                                               'array_filter'
         11        SEND_VAR                                                 !2
         12        DECLARE_LAMBDA_FUNCTION                          ~8      [1]
   44    13        SEND_VAL                                                 ~8
   42    14        DO_ICALL                                         $9      
   44    15        SEND_VAR                                                 $9
   42    16        DO_ICALL                                                 
   44    17      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/foURE
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   35     2        TYPE_CHECK                                  1020          !1
          3      > JMPZ                                                     ~2, ->6
   36     4    >   SUB                                              ~3      !0, !1
          5      > RETURN                                                   ~3
   38     6    > > RETURN                                                   null
   40     7*     > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/foURE
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $z
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   42     0  E >   RECV                                             !0      
   43     1        TYPE_CHECK                                  1020  ~1      !0
          2      > RETURN                                                   ~1
   44     3*     > RETURN                                                   null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.06 ms | 1003 KiB | 16 Q