3v4l.org

run code in 300+ PHP versions simultaneously
<?php function validateMobile($mobile, &$mathed){ return preg_match("/^1[345789]\d{9}$/", $mobile, $mathed); } var_dump(validateMobile('15905199150', $mathed)); var_dump($mathed);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZdJKV
function name:  (null)
number of ops:  11
compiled vars:  !0 = $mathed
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'validatemobile'
          2        SEND_VAL                                                 '15905199150'
          3        SEND_REF                                                 !0
          4        DO_FCALL                                      0  $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                                 
    8     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function validatemobile:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZdJKV
function name:  validateMobile
number of ops:  9
compiled vars:  !0 = $mobile, !1 = $mathed
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAL                                                 '%2F%5E1%5B345789%5D%5Cd%7B9%7D%24%2F'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        DO_ICALL                                         $2      
          7      > RETURN                                                   $2
    5     8*     > RETURN                                                   null

End of function validatemobile

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.68 ms | 1397 KiB | 18 Q