3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isOutgoingCall($phone) { $phone = str_replace('+', '', $phone); return preg_match('#^([456]?(380|0)[0-9]{9})$#', $phone); } $isOutgoingCallFunctionResult1 = isOutgoingCall('380957600623'); var_dump($isOutgoingCallFunctionResult1); $isOutgoingCallFunctionResult2 = isOutgoingCall('0957600623'); var_dump($isOutgoingCallFunctionResult2); $isOutgoingCallFunctionResult3 = isOutgoingCall('4380957600623'); var_dump($isOutgoingCallFunctionResult3); $isOutgoingCallFunctionResult4 = isOutgoingCall('40957600623'); var_dump($isOutgoingCallFunctionResult4); $isOutgoingCallFunctionResult5 = isOutgoingCall('5380957600623'); var_dump($isOutgoingCallFunctionResult5); $isOutgoingCallFunctionResult6 = isOutgoingCall('50957600623'); var_dump($isOutgoingCallFunctionResult6); $isOutgoingCallFunctionResult7 = isOutgoingCall('6380957600623'); var_dump($isOutgoingCallFunctionResult7); $isOutgoingCallFunctionResult8 = isOutgoingCall('60957600623'); var_dump($isOutgoingCallFunctionResult8); $isOutgoingCallFunctionResult9 = isOutgoingCall('012345678'); var_dump($isOutgoingCallFunctionResult9);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eqk1E
function name:  (null)
number of ops:  64
compiled vars:  !0 = $isOutgoingCallFunctionResult1, !1 = $isOutgoingCallFunctionResult2, !2 = $isOutgoingCallFunctionResult3, !3 = $isOutgoingCallFunctionResult4, !4 = $isOutgoingCallFunctionResult5, !5 = $isOutgoingCallFunctionResult6, !6 = $isOutgoingCallFunctionResult7, !7 = $isOutgoingCallFunctionResult8, !8 = $isOutgoingCallFunctionResult9
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'isoutgoingcall'
          1        SEND_VAL                                                 '380957600623'
          2        DO_FCALL                                      0  $9      
          3        ASSIGN                                                   !0, $9
   12     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   14     7        INIT_FCALL                                               'isoutgoingcall'
          8        SEND_VAL                                                 '0957600623'
          9        DO_FCALL                                      0  $12     
         10        ASSIGN                                                   !1, $12
   15    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
   17    14        INIT_FCALL                                               'isoutgoingcall'
         15        SEND_VAL                                                 '4380957600623'
         16        DO_FCALL                                      0  $15     
         17        ASSIGN                                                   !2, $15
   18    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                                 
   20    21        INIT_FCALL                                               'isoutgoingcall'
         22        SEND_VAL                                                 '40957600623'
         23        DO_FCALL                                      0  $18     
         24        ASSIGN                                                   !3, $18
   21    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !3
         27        DO_ICALL                                                 
   23    28        INIT_FCALL                                               'isoutgoingcall'
         29        SEND_VAL                                                 '5380957600623'
         30        DO_FCALL                                      0  $21     
         31        ASSIGN                                                   !4, $21
   24    32        INIT_FCALL                                               'var_dump'
         33        SEND_VAR                                                 !4
         34        DO_ICALL                                                 
   26    35        INIT_FCALL                                               'isoutgoingcall'
         36        SEND_VAL                                                 '50957600623'
         37        DO_FCALL                                      0  $24     
         38        ASSIGN                                                   !5, $24
   27    39        INIT_FCALL                                               'var_dump'
         40        SEND_VAR                                                 !5
         41        DO_ICALL                                                 
   29    42        INIT_FCALL                                               'isoutgoingcall'
         43        SEND_VAL                                                 '6380957600623'
         44        DO_FCALL                                      0  $27     
         45        ASSIGN                                                   !6, $27
   30    46        INIT_FCALL                                               'var_dump'
         47        SEND_VAR                                                 !6
         48        DO_ICALL                                                 
   32    49        INIT_FCALL                                               'isoutgoingcall'
         50        SEND_VAL                                                 '60957600623'
         51        DO_FCALL                                      0  $30     
         52        ASSIGN                                                   !7, $30
   33    53        INIT_FCALL                                               'var_dump'
         54        SEND_VAR                                                 !7
         55        DO_ICALL                                                 
   35    56        INIT_FCALL                                               'isoutgoingcall'
         57        SEND_VAL                                                 '012345678'
         58        DO_FCALL                                      0  $33     
         59        ASSIGN                                                   !8, $33
   36    60        INIT_FCALL                                               'var_dump'
         61        SEND_VAR                                                 !8
         62        DO_ICALL                                                 
         63      > RETURN                                                   1

Function isoutgoingcall:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eqk1E
function name:  isOutgoingCall
number of ops:  13
compiled vars:  !0 = $phone
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '%2B'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6        ASSIGN                                                   !0, $1
    7     7        INIT_FCALL                                               'preg_match'
          8        SEND_VAL                                                 '%23%5E%28%5B456%5D%3F%28380%7C0%29%5B0-9%5D%7B9%7D%29%24%23'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $3      
         11      > RETURN                                                   $3
    8    12*     > RETURN                                                   null

End of function isoutgoingcall

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.67 ms | 1442 KiB | 25 Q