3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = str_replace( ' ', "\n", 'abc efg hij' ); $value = str_replace( ' ', "\n", array( 'abc', 'efg', 'hij' ) ); // What about for boolean, int, float? $value = str_replace( ' ', "\n", false ); $value = str_replace( ' ', "\n", -100 ); $value = str_replace( ' ', "\n", 100.25 );

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.0070.01117.78
8.4.10.0000.01919.45
8.3.140.0070.00716.33
8.3.130.0090.00018.20
8.3.120.0000.00918.60
8.3.110.0040.00416.62
8.3.100.0070.00724.06
8.3.90.0090.00626.77
8.3.80.0060.00316.38
8.3.70.0150.00616.58
8.3.60.0150.00616.38
8.3.50.0070.01116.20
8.3.40.0040.01118.64
8.3.30.0030.01018.59
8.3.20.0040.00424.18
8.3.10.0090.00024.66
8.3.00.0050.00326.16
8.2.260.0110.00716.31
8.2.250.0070.00716.38
8.2.240.0080.00018.79
8.2.230.0060.00320.94
8.2.220.0230.00037.54
8.2.210.0080.00026.77
8.2.200.0030.00618.04
8.2.190.0120.00316.58
8.2.180.0120.00625.92
8.2.170.0080.01118.83
8.2.160.0110.00422.96
8.2.150.0120.00425.66
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0080.00026.35
8.2.110.0040.00720.96
8.2.100.0060.00617.84
8.2.90.0040.00419.16
8.2.80.0000.00917.97
8.2.70.0040.00417.63
8.2.60.0060.00317.93
8.2.50.0030.00618.07
8.2.40.0000.00818.22
8.2.30.0070.00317.91
8.2.20.0040.00418.05
8.2.10.0040.00419.29
8.2.00.0040.00419.12
8.1.310.0040.00418.27
8.1.300.0130.00715.84
8.1.290.0030.00630.84
8.1.280.0070.00725.92
8.1.270.0050.00223.99
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0030.00721.31
8.1.230.0070.00418.85
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0060.00317.13
8.1.190.0080.00017.23
8.1.180.0050.00318.10
8.1.170.0000.00718.77
8.1.160.0000.00718.79
8.1.150.0040.00418.73
8.1.140.0000.00718.86
8.1.130.0050.00317.42
8.1.120.0000.00717.42
8.1.110.0000.00917.41
8.1.100.0000.00817.31
8.1.90.0040.00417.40
8.1.80.0000.01117.45
8.1.70.0000.00717.43
8.1.60.0030.00617.44
8.1.50.0060.00317.40
8.1.40.0030.00617.28
8.1.30.0040.00417.48
8.1.20.0040.00417.45
8.1.10.0040.00417.35
8.1.00.0000.00717.39
8.0.300.0000.00818.77
8.0.290.0050.00316.75
8.0.280.0000.00818.37
8.0.270.0050.00217.85
8.0.260.0030.00316.80
8.0.250.0040.00416.88
8.0.240.0030.00316.90
8.0.230.0070.00016.80
8.0.220.0030.00316.88
8.0.210.0000.00716.76
8.0.200.0030.00316.90
8.0.190.0040.00416.77
8.0.180.0040.00416.83
8.0.170.0030.00616.87
8.0.160.0000.00716.88
8.0.150.0040.00416.79
8.0.140.0040.00416.82
8.0.130.0000.00613.29
8.0.120.0030.00616.65
8.0.110.0070.00016.88
8.0.100.0000.00716.63
8.0.90.0030.00316.82
8.0.80.0080.01116.78
8.0.70.0000.00716.71
8.0.60.0000.00716.83
8.0.50.0000.00816.89
8.0.30.0090.01016.83
8.0.20.0090.01116.84
8.0.10.0120.00816.96
8.0.00.0100.01016.93
7.4.330.0000.00515.55
7.4.320.0030.00316.54
7.4.300.0030.00316.56
7.4.290.0000.00816.37
7.4.280.0040.00416.41
7.4.270.0070.00016.44
7.4.260.0040.00416.42
7.4.250.0000.00716.45
7.4.240.0040.00416.47
7.4.230.0040.00416.61
7.4.220.0000.00716.23
7.4.210.0100.00416.48
7.4.200.0050.00216.44
7.4.160.0060.01316.50
7.4.150.0110.00716.48
7.4.140.0080.01316.35
7.4.130.0090.01016.31
7.4.120.0100.00816.38
7.4.110.0070.01016.36
7.4.100.0100.00916.51
7.4.90.0080.00916.41
7.4.80.0070.01116.34
7.4.70.0070.01016.37
7.4.60.0090.01016.29
7.4.50.0090.00916.30
7.4.40.0110.00616.27
7.4.30.0130.00616.31
7.4.20.0120.00716.34
7.4.10.0120.00616.38
7.4.00.0080.00916.39
7.3.330.0030.00616.19
7.3.320.0000.00512.98
7.3.310.0030.00316.13
7.3.300.0000.00716.02
7.3.290.0080.00716.16
7.3.270.0130.00716.10
7.3.260.0130.00616.15
7.3.250.0120.00516.11
7.3.240.0080.01016.13
7.3.230.0080.00816.14
7.3.220.0140.00316.07
7.3.210.0120.00616.07
7.3.200.0100.01116.11
7.3.190.0120.00616.12
7.3.180.0110.00816.09
7.3.170.0130.00616.10
7.3.160.0100.00816.11
7.3.150.0140.00516.10
7.3.140.0150.00616.00
7.3.130.0110.01016.04
7.3.120.0110.00716.10
7.3.110.0120.00916.03
7.3.100.0090.00815.99
7.3.90.0110.00716.35
7.3.80.0120.00716.07
7.3.70.0130.00416.17
7.3.60.0120.00616.22
7.3.50.0090.00916.25
7.3.40.0100.00816.26
7.3.30.0120.00516.29
7.3.20.0090.00816.27
7.3.10.0100.00916.26
7.3.00.0110.01016.71

preferences:
76.68 ms | 403 KiB | 5 Q