3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <option value="123"></option> <option value="412"></option> HTML; preg_match_all('/value="(\w+)/', $html, $result); $digits = array_filter($result[1], 'ctype_digit'); var_dump($digits);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mMbO0
function name:  (null)
number of ops:  16
compiled vars:  !0 = $html, !1 = $result, !2 = $digits
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Coption+value%3D%22123%22%3E%3C%2Foption%3E%0A%3Coption+value%3D%22412%22%3E%3C%2Foption%3E+'
    8     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2Fvalue%3D%22%28%5Cw%2B%29%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    9     6        INIT_FCALL                                               'array_filter'
          7        FETCH_DIM_R                                      ~5      !1, 1
          8        SEND_VAL                                                 ~5
          9        SEND_VAL                                                 'ctype_digit'
         10        DO_ICALL                                         $6      
         11        ASSIGN                                                   !2, $6
   10    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.91 ms | 1011 KiB | 16 Q