3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=array(array('#0kg - 50kg','Questions?','1|2'), array('Yes','','3|4'), array('#51kg - 100kg','Questions?','5|6')); for ($i=0,$j=0;$i<count($array);$i++) { if (strpos($array[$i][0], '#') !== false) { echo preg_replace("/#/",'',$array[$i][0]); $j++; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 4
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 21
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 4
Branch analysis from position: 25
Branch analysis from position: 4
Branch analysis from position: 21
filename:       /in/Ns3qY
function name:  (null)
number of ops:  26
compiled vars:  !0 = $array, !1 = $i, !2 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1        ASSIGN                                                   !1, 0
          2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->22
    8     4    >   INIT_FCALL                                               'strpos'
          5        FETCH_DIM_R                                      ~6      !0, !1
          6        FETCH_DIM_R                                      ~7      ~6, 0
          7        SEND_VAL                                                 ~7
          8        SEND_VAL                                                 '%23'
          9        DO_ICALL                                         $8      
         10        TYPE_CHECK                                  1018          $8
         11      > JMPZ                                                     ~9, ->21
    9    12    >   INIT_FCALL                                               'preg_replace'
         13        SEND_VAL                                                 '%2F%23%2F'
         14        SEND_VAL                                                 ''
         15        FETCH_DIM_R                                      ~10     !0, !1
         16        FETCH_DIM_R                                      ~11     ~10, 0
         17        SEND_VAL                                                 ~11
         18        DO_ICALL                                         $12     
         19        ECHO                                                     $12
   10    20        PRE_INC                                                  !2
    7    21    >   PRE_INC                                                  !1
         22    >   COUNT                                            ~15     !0
         23        IS_SMALLER                                               !1, ~15
         24      > JMPNZ                                                    ~16, ->4
   12    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.96 ms | 943 KiB | 18 Q