3v4l.org

run code in 300+ PHP versions simultaneously
<?php $before = 'I have 10000 dollars.'; $expect = 'I have 10,000 dollars.'; $result = preg_replace_callback( '/\d+/', function($number) { return number_format($number[0]); }, $before ); var_dump($result === $expect); echo $result;

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.140.0150.00917.65
8.4.130.0080.01118.10
8.4.120.0040.00522.47
8.4.110.0140.00722.32
8.4.100.0100.01018.60
8.4.90.0090.00218.86
8.4.80.0110.00818.90
8.4.70.0050.00419.94
8.4.60.0120.00919.02
8.4.50.0120.00820.57
8.4.40.0100.01019.49
8.4.30.0050.00818.59
8.4.20.0180.00418.73
8.4.10.0030.00620.53
8.3.270.0150.00616.50
8.3.260.0080.01116.81
8.3.250.0040.00718.84
8.3.240.0060.00217.12
8.3.230.0160.00516.91
8.3.220.0100.00918.97
8.3.210.0120.00716.72
8.3.200.0100.00916.70
8.3.190.0090.00517.15
8.3.180.0090.01018.82
8.3.170.0070.01117.11
8.3.160.0030.01516.76
8.3.150.0060.00917.19
8.3.140.0040.01216.84
8.3.130.0180.00416.63
8.3.120.0060.00320.48
8.3.110.0030.00618.34
8.3.100.0000.00816.69
8.3.90.0000.01526.77
8.3.80.0060.00318.43
8.3.70.0080.00816.75
8.3.60.0070.00716.50
8.3.50.0110.00418.20
8.3.40.0060.00918.96
8.3.30.0090.00618.95
8.3.20.0040.00424.18
8.3.10.0000.00824.66
8.3.00.0040.00426.16
8.2.290.0130.00520.54
8.2.280.0150.00618.81
8.2.270.0100.00716.85
8.2.260.0150.00417.27
8.2.250.0040.00418.68
8.2.240.0080.00820.76
8.2.230.0000.00820.94
8.2.220.0120.00624.06
8.2.210.0070.01126.77
8.2.200.0060.00616.75
8.2.190.0130.01016.75
8.2.180.0110.00425.92
8.2.170.0000.01522.96
8.2.160.0090.00622.96
8.2.150.0050.00325.66
8.2.140.0090.00024.66
8.2.130.0060.00326.16
8.2.120.0000.00721.07
8.2.110.0030.00719.27
8.2.100.0040.00718.03
8.2.90.0030.00519.42
8.2.80.0000.00817.97
8.2.70.0030.00617.88
8.2.60.0080.00018.05
8.2.50.0040.00418.07
8.2.40.0050.00318.22
8.2.30.0000.00718.17
8.2.20.0040.00418.19
8.2.10.0030.00519.38
8.2.00.0000.00719.27
8.1.330.0110.00721.92
8.1.320.0100.01016.18
8.1.310.0140.00416.94
8.1.300.0060.00318.10
8.1.290.0030.01030.84
8.1.280.0110.00325.92
8.1.270.0000.00823.99
8.1.260.0080.00026.35
8.1.250.0000.00928.09
8.1.240.0160.00619.50
8.1.230.0120.00020.97
8.1.220.0060.00317.79
8.1.210.0030.00618.77
8.1.200.0030.00617.47
8.1.190.0000.00817.60
8.1.180.0050.00318.10
8.1.170.0040.00418.81
8.1.160.0000.00718.98
8.1.150.0000.00718.93
8.1.140.0000.00820.76
8.1.130.0000.00720.16
8.1.120.0070.00017.67
8.1.110.0030.00517.63
8.1.100.0060.00317.67
8.1.90.0000.00817.72
8.1.80.0000.00717.61
8.1.70.0070.00017.63
8.1.60.0000.01117.70
8.1.50.0000.00917.69
8.1.40.0050.00317.69
8.1.30.0040.00417.75
8.1.20.0040.00417.69
8.1.10.0030.00517.68
8.1.00.0030.00617.72
8.0.300.0000.00918.77
8.0.290.0040.00416.88
8.0.280.0030.00318.69
8.0.270.0030.00318.14
8.0.260.0000.00720.48
8.0.250.0030.00317.07
8.0.240.0100.00017.05
8.0.230.0040.00416.96
8.0.220.0000.00716.87
8.0.210.0000.00616.99
8.0.200.0070.00017.21
8.0.190.0040.00417.02
8.0.180.0000.00817.02
8.0.170.0080.00017.09
8.0.160.0040.00417.16
8.0.150.0000.00717.00
8.0.140.0070.00017.02
8.0.130.0000.00613.59
8.0.120.0040.00417.05
8.0.110.0040.00417.14
8.0.100.0040.00417.20
8.0.90.0000.00817.08
8.0.80.0070.00817.04
8.0.70.0050.00317.08
8.0.60.0040.00417.07
8.0.50.0000.00816.96
8.0.30.0270.00717.10
8.0.20.0250.00517.02
8.0.10.0150.01217.21
8.0.00.0140.00417.17
7.4.330.0000.00515.55
7.4.320.0000.00716.87
7.4.300.0000.00616.73
7.4.290.0060.00416.61
7.4.280.0060.00316.83
7.4.270.0040.00416.91
7.4.260.0030.00313.54
7.4.250.0070.00016.75
7.4.240.0040.00316.87
7.4.230.0070.00016.67
7.4.220.0040.00416.89
7.4.210.0070.01216.82
7.4.200.0000.00816.86
7.4.160.0200.00716.77
7.4.150.0260.00316.88
7.4.140.0120.01516.69
7.4.130.0200.00716.77
7.4.120.0170.01016.87
7.4.110.0210.00516.71
7.4.100.0220.00916.89
7.4.90.0170.00916.85
7.4.80.0290.00616.77
7.4.70.0300.00016.87
7.4.60.0170.01616.86
7.4.50.0200.00716.78
7.4.40.0170.00716.71
7.4.30.0210.01016.85
7.4.20.0150.01116.65
7.4.10.0160.01016.63
7.4.00.0180.01216.76
7.3.330.0040.00416.57
7.3.320.0060.00013.63
7.3.310.0040.00416.60
7.3.300.0030.00316.52
7.3.290.0070.01016.54
7.3.280.0230.00316.51
7.3.270.0180.01216.55
7.3.260.0180.00816.51
7.3.250.0170.01016.60
7.3.240.0180.01516.47
7.3.230.0180.00016.58
7.3.220.0270.01216.49
7.3.210.0220.00916.50
7.3.200.0220.00716.50
7.3.190.0210.00716.47
7.3.180.0140.01116.48
7.3.170.0280.00016.47
7.3.160.0220.00616.49
7.3.150.0120.01616.49
7.3.140.0290.00616.46
7.3.130.0190.01116.48
7.3.120.0060.01416.46
7.3.110.0140.00316.45
7.3.100.0070.01516.45
7.3.90.0140.00716.83
7.3.80.0030.02016.58
7.3.70.0120.00916.68
7.3.60.0040.01116.71
7.3.50.0060.00916.66
7.3.40.0040.01116.65
7.3.30.0190.01216.65
7.3.20.0230.01316.77
7.3.10.0150.02316.55
7.3.00.0200.01216.70

preferences:
34.57 ms | 403 KiB | 5 Q