3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_numerics ($str) { preg_match_all('/\d+/', $str, $matches); return $matches[0]; } $one = 'foo bar 4 baz (5 qux quux)'; $two = 'bar baz 2 bar'; $three = 'qux bar 12 quux (3 foo)'; $four = 'foo baz 3 bar (13 quux foo)'; $test = get_numerics($one); echo $test[0];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eTT0s
function name:  (null)
number of ops:  11
compiled vars:  !0 = $one, !1 = $two, !2 = $three, !3 = $four, !4 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 'foo+bar+4+baz+%285+qux+quux%29'
    9     1        ASSIGN                                                   !1, 'bar+baz+2+bar'
   10     2        ASSIGN                                                   !2, 'qux+bar+12+quux+%283+foo%29'
   11     3        ASSIGN                                                   !3, 'foo+baz+3+bar+%2813+quux+foo%29'
   13     4        INIT_FCALL                                               'get_numerics'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0  $9      
          7        ASSIGN                                                   !4, $9
   14     8        FETCH_DIM_R                                      ~11     !4, 0
          9        ECHO                                                     ~11
         10      > RETURN                                                   1

Function get_numerics:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eTT0s
function name:  get_numerics
number of ops:  9
compiled vars:  !0 = $str, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%5Cd%2B%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    5     6        FETCH_DIM_R                                      ~3      !1, 0
          7      > RETURN                                                   ~3
    6     8*     > RETURN                                                   null

End of function get_numerics

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.25 ms | 1389 KiB | 16 Q