3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array("stati3on8", "2ndExit", "block9a", "floor5"); var_dump(minMaxNum($arr)); die(); function minMaxNum ($arr = array()) { $min = $max = null;$all_nums = array(); foreach ($arr as $value) { $value = preg_split('/(?<=\d)(?=[a-zA-Z])|(?<=[a-zA-Z])(?=\d)/i', $value); $value = array_filter($value, function ($n){ if(!is_numeric($n)) { unset($n); }else { return $n; } }); array_push($all_nums, $value); } return $all_nums; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/9PqZA
function name:  (null)
number of ops:  9
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL_BY_NAME                                       'minMaxNum'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
    6     7      > EXIT                                                     
   22     8*     > RETURN                                                   1

Function minmaxnum:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 22
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 22
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/9PqZA
function name:  minMaxNum
number of ops:  25
compiled vars:  !0 = $arr, !1 = $min, !2 = $max, !3 = $all_nums, !4 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV_INIT                                        !0      <array>
    9     1        ASSIGN                                           ~5      !2, null
          2        ASSIGN                                                   !1, ~5
          3        ASSIGN                                                   !3, <array>
   10     4      > FE_RESET_R                                       $8      !0, ->22
          5    > > FE_FETCH_R                                               $8, !4, ->22
   11     6    >   INIT_FCALL                                               'preg_split'
          7        SEND_VAL                                                 '%2F%28%3F%3C%3D%5Cd%29%28%3F%3D%5Ba-zA-Z%5D%29%7C%28%3F%3C%3D%5Ba-zA-Z%5D%29%28%3F%3D%5Cd%29%2Fi'
          8        SEND_VAR                                                 !4
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !4, $9
   12    11        INIT_FCALL                                               'array_filter'
         12        SEND_VAR                                                 !4
         13        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F9PqZA%3A12%240'
   18    14        SEND_VAL                                                 ~11
         15        DO_ICALL                                         $12     
   12    16        ASSIGN                                                   !4, $12
   19    17        INIT_FCALL                                               'array_push'
         18        SEND_REF                                                 !3
         19        SEND_VAR                                                 !4
         20        DO_ICALL                                                 
   10    21      > JMP                                                      ->5
         22    >   FE_FREE                                                  $8
   21    23      > RETURN                                                   !3
   22    24*     > RETURN                                                   null

End of function minmaxnum

Function %00%7Bclosure%7D%2Fin%2F9PqZA%3A12%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9PqZA
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'is_numeric'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        BOOL_NOT                                         ~2      $1
          5      > JMPZ                                                     ~2, ->8
   14     6    >   UNSET_CV                                                 !0
          7      > JMP                                                      ->9
   16     8    > > RETURN                                                   !0
   18     9    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F9PqZA%3A12%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
130.89 ms | 1405 KiB | 23 Q