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('0123456789'); var_dump($isOutgoingCallFunctionResult9);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.120.0100.00020.74
8.3.110.0310.00916.60
8.3.100.0340.01016.42
8.3.90.0320.00916.43
8.3.80.0200.00516.13
8.3.70.0220.00416.25
8.3.60.0190.00616.50
8.3.50.0170.00816.38
8.3.40.0220.00017.22
8.3.30.0100.01017.50
8.3.20.0210.00017.00
8.3.10.0160.00517.25
8.3.00.0090.01417.38
8.2.240.0060.00318.83
8.2.230.0160.00316.12
8.2.220.0150.00716.34
8.2.210.0150.00516.48
8.2.200.0130.00816.34
8.2.190.0190.00616.48
8.2.180.0050.01616.38
8.2.170.0240.00017.50
8.2.160.0140.00917.49
8.2.150.0160.00817.50
8.2.140.0190.00417.38
8.2.130.0300.00917.24
8.2.120.0300.00617.49
8.2.110.0220.00717.50
8.2.100.0210.00017.50
8.2.90.0240.00917.50
8.2.80.0190.00817.50
8.2.70.0210.00417.50
8.2.60.0240.00017.25
8.2.50.0230.00317.12
8.2.40.0190.00417.25
8.2.30.0120.00917.59
8.2.20.0210.00417.21
8.2.10.0090.01417.13
8.2.00.0150.00717.25
8.1.300.0120.00318.34
8.1.290.0130.00816.13
8.1.280.0160.00616.12
8.1.270.0170.00017.26
8.1.260.0180.00317.36
8.1.250.0300.00317.25
8.1.240.0270.00617.13
8.1.230.0350.00017.38
8.1.220.0370.00317.35
8.1.210.0370.00417.25
8.1.200.0380.00017.25
8.1.190.0180.02117.13
8.1.180.0310.00816.97
8.1.170.0350.00316.98
8.1.160.0420.00717.00
8.1.150.0280.00717.22
8.1.140.0260.01617.11
8.1.130.0390.00617.10
8.1.120.0340.00317.35
8.1.110.0190.01917.35
8.1.100.0180.01417.38
8.1.90.0290.00317.25
8.1.80.0280.00617.38
8.1.70.0380.00017.34
8.1.60.0350.00717.50
8.1.50.0270.00717.47
8.1.40.0390.00017.22
8.1.30.0230.01617.38
8.1.20.0320.00617.38
8.1.10.0360.00317.13
8.1.00.0300.00917.34

preferences:
36.18 ms | 403 KiB | 5 Q