3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "This is a " . str_repeat("test", 2) . "!\n" . str_repeat("hello", 3) . " and Bye!\n" . "When I sleep, the thought bubble says " . str_repeat("zz", 3) . "."; echo preg_replace_callback( '~\b(\w+?)\1+\b~', function($m) { return "[{$m[1]}](" . (strlen($m[0]) / strlen($m[1])) . ")"; }, $string );

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.130.0070.00318.08
8.4.120.0060.01020.85
8.4.110.0040.00519.01
8.4.100.0080.00217.94
8.4.90.0090.01118.88
8.4.80.0100.00318.04
8.4.70.0170.00518.08
8.4.60.0130.00818.59
8.4.50.0110.01118.73
8.4.40.0130.00618.63
8.4.30.0110.01118.70
8.4.20.0080.01120.59
8.4.10.0040.01519.65
8.3.260.0060.00316.87
8.3.250.0140.00618.82
8.3.240.0050.00316.61
8.3.230.0070.01116.66
8.3.220.0100.00716.99
8.3.210.0080.00618.49
8.3.200.0050.00416.46
8.3.190.0120.00717.08
8.3.180.0070.00218.30
8.3.170.0110.00716.89
8.3.160.0160.00316.97
8.3.150.0060.01219.11
8.3.140.0090.00918.97
8.3.130.0030.00618.40
8.3.120.0060.00320.60
8.3.110.0070.00316.74
8.3.100.0120.00316.85
8.3.90.0040.00418.59
8.3.80.0100.00017.97
8.3.70.0070.01118.43
8.3.60.0110.00718.58
8.3.50.0080.00824.48
8.3.40.0090.00620.42
8.3.30.0070.00718.81
8.3.20.0050.00321.91
8.3.10.0030.00622.09
8.3.00.0080.00020.76
8.2.290.0120.00720.80
8.2.280.0120.00822.71
8.2.270.0000.01817.19
8.2.260.0110.00718.27
8.2.250.0090.00018.90
8.2.240.0090.00017.23
8.2.230.0160.00320.94
8.2.220.0030.00624.06
8.2.210.0070.01126.77
8.2.200.0090.00018.54
8.2.190.0110.00716.75
8.2.180.0070.01416.63
8.2.170.0120.00322.96
8.2.160.0130.00319.46
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00021.12
8.2.110.0090.00020.48
8.2.100.0030.01018.03
8.2.90.0040.00418.00
8.2.80.0000.00817.97
8.2.70.0080.00017.75
8.2.60.0030.00517.88
8.2.50.0000.00818.05
8.2.40.0040.00421.32
8.2.30.0000.00818.04
8.2.20.0030.00518.21
8.2.10.0040.00421.10
8.2.00.0070.00019.37
8.1.330.0170.00323.94
8.1.320.0070.01316.45
8.1.310.0040.00418.63
8.1.300.0130.00318.43
8.1.290.0060.00318.88
8.1.280.0110.00425.92
8.1.270.0040.00422.19
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0040.00422.14
8.1.230.0000.01319.17
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0060.00317.47
8.1.180.0050.00518.10
8.1.170.0000.00817.62
8.1.160.0000.00818.80
8.1.150.0030.00618.92
8.1.140.0040.00418.83
8.1.130.0090.00320.21
8.1.120.0040.00417.71
8.1.110.0040.00417.64
8.1.100.0000.00717.50
8.1.90.0070.00017.54
8.1.80.0080.00017.52
8.1.70.0060.00317.66
8.1.60.0000.00917.75
8.1.50.0050.00217.51
8.1.40.0040.00417.62
8.1.30.0070.00317.86
8.1.20.0000.00917.80
8.1.10.0040.00417.73
8.1.00.0000.00717.73
8.0.300.0030.00621.69
8.0.290.0040.00416.88
8.0.280.0000.00718.47
8.0.270.0030.00318.05
8.0.260.0040.00420.15
8.0.250.0070.00017.11
8.0.240.0000.00717.00
8.0.230.0050.00217.09
8.0.220.0050.00216.93
8.0.210.0050.00217.02
8.0.200.0000.00717.04
8.0.190.0000.00817.14
8.0.180.0080.00017.07
8.0.170.0060.00317.02
8.0.160.0000.00817.03
8.0.150.0040.00416.90
8.0.140.0040.00417.01
8.0.130.0000.00513.39
8.0.120.0030.00616.98
8.0.110.0000.00716.86
8.0.100.0070.00016.91
8.0.90.0090.00017.02
8.0.80.0060.00816.99
8.0.70.0040.00417.07
8.0.60.0030.00517.01
8.0.50.0040.00416.92
8.0.30.0060.00917.13
8.0.20.0060.01417.52
8.0.10.0000.00817.05
8.0.00.0100.01316.73
7.4.330.0040.00015.55
7.4.320.0030.00316.73
7.4.300.0030.00316.64
7.4.290.0070.00016.70
7.4.280.0030.00516.81
7.4.270.0000.01116.88
7.4.260.0000.00613.38
7.4.250.0040.00416.63
7.4.240.0040.00416.68
7.4.230.0050.00216.74
7.4.220.0030.00416.74
7.4.210.0080.00816.92
7.4.200.0070.00016.68
7.4.130.0100.00916.62
7.4.120.0060.01316.95
7.4.110.0090.00916.73
7.4.100.0030.01716.53
7.4.90.0040.01116.64
7.4.80.0090.01219.39
7.4.70.0030.01316.74
7.4.60.0080.00816.70
7.4.50.0070.00716.89
7.4.40.0110.00816.69
7.4.30.0110.00716.61
7.4.20.0130.00616.59
7.4.10.0110.00516.63
7.4.00.0070.01016.70
7.3.330.0040.00416.30
7.3.320.0060.00013.24
7.3.310.0070.00016.30
7.3.300.0030.00316.52
7.3.290.0070.00816.36
7.3.280.0100.00616.36
7.3.260.0090.01516.50
7.3.230.0100.00716.43
7.3.210.0090.00916.70
7.3.200.0130.01216.47
7.3.190.0090.00916.37
7.3.180.0160.00616.45
7.3.170.0060.01216.41
7.3.160.0060.01616.60
7.3.150.0080.00716.50
7.3.140.0110.00716.68
7.3.130.0120.00416.74
7.3.120.0090.01216.50
7.3.110.0030.01516.38
7.3.100.0000.01716.69
7.3.90.0110.01016.76
7.3.80.0100.00616.30
7.3.70.0090.00916.39
7.3.60.0130.00916.35
7.3.50.0060.01316.44
7.3.40.0130.00716.45
7.3.30.0040.01216.47
7.3.20.0100.00616.51
7.3.10.0030.01316.32
7.3.00.0140.00316.48
7.2.330.0120.00917.00
7.2.320.0000.01617.00
7.2.310.0070.01016.89
7.2.300.0060.01216.88
7.2.290.0060.01317.00
7.2.280.0070.01016.91
7.2.270.0070.01016.69
7.2.260.0070.01716.78
7.2.250.0070.01016.84
7.2.240.0060.01216.85
7.2.230.0120.01216.69
7.2.220.0120.00616.89
7.2.210.0100.00716.75
7.2.200.0110.01116.64
7.2.190.0100.00916.77
7.2.180.0070.01016.78
7.2.170.0130.00316.77
7.2.160.0060.01316.81
7.2.150.0060.01016.79
7.2.140.0160.00716.83
7.2.130.0060.00916.86
7.2.120.0090.00816.92
7.2.110.0030.01416.94
7.2.100.0120.00616.76
7.2.90.0100.00716.96
7.2.80.0070.01017.03
7.2.70.0120.00616.88
7.2.60.0100.00916.97
7.2.50.0090.01216.96
7.2.40.0000.02416.84
7.2.30.0150.00916.82
7.2.20.0030.01316.99
7.2.10.0120.01216.78
7.2.00.0120.00616.93

preferences:
135.78 ms | 403 KiB | 5 Q