3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=array('A-C','A-E','Yes or No'); $result=showresult('A-C'); //$result=array_map("showresult",$array); function showresult($a){ $case=preg_match_all('/-|or/',$a,$matches); $explode_by=$matches[0][0]; //print_r($matches[0][0]);die(); $a_explode=explode($explode_by,$a); echo $a_explode[0]; echo "<select name='n'>"; for($i=$a_explode[0];$i<=$a_explode[1];$i++){ //echo ++$a_explode[0]; echo "<option value=$i>$a_explode[1]</option>"; } echo "</select>"; // switch($matches[0]){ //case "-":for(); //} }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HTepA
function name:  (null)
number of ops:  6
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_BY_NAME                                       'showresult'
          2        SEND_VAL_EX                                              'A-C'
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !1, $3
   20     5      > RETURN                                                   1

Function showresult:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 21
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 21
Branch analysis from position: 32
Branch analysis from position: 21
filename:       /in/HTepA
function name:  showresult
number of ops:  34
compiled vars:  !0 = $a, !1 = $case, !2 = $matches, !3 = $explode_by, !4 = $a_explode, !5 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F-%7Cor%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !2
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !1, $6
    7     7        FETCH_DIM_R                                      ~8      !2, 0
          8        FETCH_DIM_R                                      ~9      ~8, 0
          9        ASSIGN                                                   !3, ~9
    9    10        INIT_FCALL                                               'explode'
         11        SEND_VAR                                                 !3
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $11     
         14        ASSIGN                                                   !4, $11
   10    15        FETCH_DIM_R                                      ~13     !4, 0
         16        ECHO                                                     ~13
   11    17        ECHO                                                     '%3Cselect+name%3D%27n%27%3E'
   12    18        FETCH_DIM_R                                      ~14     !4, 0
         19        ASSIGN                                                   !5, ~14
         20      > JMP                                                      ->29
   14    21    >   ROPE_INIT                                     5  ~18     '%3Coption+value%3D'
         22        ROPE_ADD                                      1  ~18     ~18, !5
         23        ROPE_ADD                                      2  ~18     ~18, '%3E'
         24        FETCH_DIM_R                                      ~16     !4, 1
         25        ROPE_ADD                                      3  ~18     ~18, ~16
         26        ROPE_END                                      4  ~17     ~18, '%3C%2Foption%3E'
         27        ECHO                                                     ~17
   12    28        PRE_INC                                                  !5
         29    >   FETCH_DIM_R                                      ~22     !4, 1
         30        IS_SMALLER_OR_EQUAL                                      !5, ~22
         31      > JMPNZ                                                    ~23, ->21
   16    32    >   ECHO                                                     '%3C%2Fselect%3E'
   20    33      > RETURN                                                   null

End of function showresult

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.51 ms | 1400 KiB | 17 Q