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);

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.4.20.0000.00919.56
8.4.10.0070.01319.65
8.3.150.0110.00716.52
8.3.140.0130.00616.80
8.3.130.0120.00416.75
8.3.120.0130.00620.75
8.3.110.0300.01116.58
8.3.100.0370.01216.38
8.3.90.0350.01616.43
8.3.80.0410.01016.50
8.3.70.0400.01016.25
8.3.60.0400.01016.25
8.3.50.0590.00716.00
8.3.40.0360.01417.63
8.3.30.0280.01117.25
8.3.20.0300.01017.63
8.3.10.0350.00417.48
8.3.00.0130.01317.50
8.2.260.0040.00716.81
8.2.250.0150.00618.41
8.2.240.0100.01018.55
8.2.230.0100.01016.57
8.2.220.0140.00916.44
8.2.210.0170.00316.50
8.2.200.0210.00416.46
8.2.190.0170.00816.21
8.2.180.0160.00316.77
8.2.170.0360.00017.75
8.2.160.0280.00617.63
8.2.150.0190.00617.63
8.2.140.0180.00317.63
8.2.130.0250.00017.35
8.2.120.0280.01717.38
8.2.110.0310.01217.50
8.2.100.0320.01417.50
8.2.90.0370.00317.60
8.2.80.0280.00917.50
8.2.70.0280.00817.47
8.2.60.0250.01217.50
8.2.50.0210.01417.25
8.2.40.0240.01217.38
8.2.30.0260.00717.47
8.2.20.0190.00717.50
8.2.10.0150.00317.63
8.2.00.0150.00817.38
8.1.310.0000.00816.56
8.1.300.0000.00818.47
8.1.290.0420.00316.13
8.1.280.0380.01016.24
8.1.270.0180.02217.32
8.1.260.0370.01017.13
8.1.250.0430.00317.25
8.1.240.0260.01017.48
8.1.230.0360.00917.00
8.1.220.0200.00717.11
8.1.210.0140.00517.25
8.1.200.0230.00517.13
8.1.190.0140.00417.22
8.1.180.0070.01117.10
8.1.170.0130.00417.12
8.1.160.0330.00717.22
8.1.150.0250.01417.13
8.1.140.0180.00917.00
8.1.130.0260.01117.22
8.1.120.0330.01117.25
8.1.110.0260.01017.09
8.1.100.0230.01017.23
8.1.90.0360.00717.22
8.1.80.0330.00817.11
8.1.70.0240.01517.10
8.1.60.0340.00717.48
8.1.50.0160.01217.23
8.1.40.0290.00417.38
8.1.30.0320.01217.50
8.1.20.0410.01017.47
8.1.10.0260.01217.34
8.1.00.0390.00417.23

preferences:
36.47 ms | 403 KiB | 5 Q