3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=array('A-C','A-E','Yes or No'); $result=array_map("showresult",$array); function showresult($a){ $case=preg_match_all('/-|or/',$a,$matches); // echo "$matches[0]";die(); $a_explode=explode("$matches[0]",$a); echo $a_explode[0]; // switch($matches[0]){ //case "-":for(); //} }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Tvr0P
function name:  (null)
number of ops:  7
compiled vars:  !0 = $array, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'array_map'
          2        SEND_VAL                                                 'showresult'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
   12     6      > RETURN                                                   1

Function showresult:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Tvr0P
function name:  showresult
number of ops:  17
compiled vars:  !0 = $a, !1 = $case, !2 = $matches, !3 = $a_explode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F-%7Cor%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !2
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
    7     7        INIT_FCALL                                               'explode'
          8        FETCH_DIM_R                                      ~6      !2, 0
          9        CAST                                          6  ~7      ~6
         10        SEND_VAL                                                 ~7
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $8      
         13        ASSIGN                                                   !3, $8
    8    14        FETCH_DIM_R                                      ~10     !3, 0
         15        ECHO                                                     ~10
   12    16      > RETURN                                                   null

End of function showresult

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.12 ms | 1387 KiB | 19 Q