3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isPhoneNumber($number) { return (bool) preg_match("/^\+[0-9]{2}\.[0-9]{10}$/", $number); } var_dump(isPhoneNumber("+44.1202535689")); var_dump(isPhoneNumber("aaa+44.1202535689aa")); var_dump(isPhoneNumber("foo"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3Ba7F
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'isphonenumber'
          2        SEND_VAL                                                 '%2B44.1202535689'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
    8     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'isphonenumber'
          8        SEND_VAL                                                 'aaa%2B44.1202535689aa'
          9        DO_FCALL                                      0  $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                                 
    9    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'isphonenumber'
         14        SEND_VAL                                                 'foo'
         15        DO_FCALL                                      0  $4      
         16        SEND_VAR                                                 $4
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function isphonenumber:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3Ba7F
function name:  isPhoneNumber
number of ops:  8
compiled vars:  !0 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5E%5C%2B%5B0-9%5D%7B2%7D%5C.%5B0-9%5D%7B10%7D%24%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        BOOL                                             ~2      $1
          6      > RETURN                                                   ~2
    5     7*     > RETURN                                                   null

End of function isphonenumber

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.21 ms | 1390 KiB | 20 Q