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='abc' size='3'>"; for($i=$a_explode[0];$i<=$a_explode[1];$i++){ //echo ++$a_explode[0]; // echo "<option value=$value >FFF<option>"; echo "<option value=$i>fff<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/894Mg
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
   22     5      > RETURN                                                   1

Function showresult:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 19
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 19
Branch analysis from position: 27
Branch analysis from position: 19
filename:       /in/894Mg
function name:  showresult
number of ops:  29
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
   11    15        ECHO                                                     '%3Cselect+name%3D%27abc%27+size%3D%273%27%3E'
   12    16        FETCH_DIM_R                                      ~13     !4, 0
         17        ASSIGN                                                   !5, ~13
         18      > JMP                                                      ->24
   15    19    >   ROPE_INIT                                     3  ~16     '%3Coption+value%3D'
         20        ROPE_ADD                                      1  ~16     ~16, !5
         21        ROPE_END                                      2  ~15     ~16, '%3Efff%3Coption%3E'
         22        ECHO                                                     ~15
   12    23        PRE_INC                                                  !5
         24    >   FETCH_DIM_R                                      ~19     !4, 1
         25        IS_SMALLER_OR_EQUAL                                      !5, ~19
         26      > JMPNZ                                                    ~20, ->19
   17    27    >   ECHO                                                     '%3C%2Fselect%3E'
   22    28      > RETURN                                                   null

End of function showresult

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.35 ms | 1400 KiB | 17 Q