3v4l.org

run code in 300+ PHP versions simultaneously
<?php class stringable { function __toString() { return "abc"; } } $s = new stringable(); $r = 'x'; var_dump(str_replace('a', $r, $s)); var_dump(strpos('abcd', $s)); var_dump(stripos('abcd', $s));

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.70.0190.00316.63
8.3.60.0060.00918.56
8.3.50.0090.00816.45
8.3.40.0100.00718.59
8.3.30.0070.00718.60
8.3.20.0070.00020.07
8.3.10.0090.00022.08
8.3.00.0050.00320.89
8.2.190.0090.00616.58
8.2.180.0180.00418.29
8.2.170.0110.00422.96
8.2.160.0070.00719.34
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0070.00020.84
8.2.120.0030.00726.35
8.2.110.0060.00320.79
8.2.100.0110.00017.91
8.2.90.0030.00617.75
8.2.80.0050.00317.97
8.2.70.0040.00417.93
8.2.60.0030.00618.09
8.2.50.0080.00018.10
8.2.40.0040.00419.25
8.2.30.0040.00420.53
8.2.20.0040.00417.98
8.2.10.0000.00717.88
8.2.00.0000.00717.85
8.1.280.0060.01225.92
8.1.270.0000.00722.14
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0120.00017.11
8.1.230.0070.00317.83
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0030.00617.23
8.1.190.0050.00318.88
8.1.180.0040.00418.10
8.1.170.0040.00418.48
8.1.160.0000.00718.69
8.1.150.0000.00718.61
8.1.140.0060.00317.33
8.1.130.0030.00317.41
8.1.120.0040.00417.33
8.1.110.0000.00817.34
8.1.100.0000.00717.32
8.1.90.0000.00717.29
8.1.80.0000.00717.39
8.1.70.0070.00017.35
8.1.60.0070.00017.50
8.1.50.0000.00717.43
8.1.40.0000.00717.30
8.1.30.0030.00517.59
8.1.20.0050.00217.61
8.1.10.0000.00817.30
8.1.00.0050.00317.20
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0080.00018.23
8.0.270.0030.00516.68
8.0.260.0030.00317.29
8.0.250.0070.00016.82
8.0.240.0040.00416.98
8.0.230.0040.00416.85
8.0.220.0030.00316.84
8.0.210.0000.00716.91
8.0.200.0030.00616.83
8.0.190.0030.00516.96
8.0.180.0040.00416.90
8.0.170.0040.00416.81
8.0.160.0040.00316.95
8.0.150.0030.00516.86
8.0.140.0120.00016.58
8.0.130.0060.00013.27
8.0.120.0050.00316.88
8.0.110.0050.00316.80
8.0.100.0040.00416.83
8.0.90.0050.00216.76
8.0.80.0000.01516.78
8.0.70.0040.00416.68
8.0.60.0050.00316.69
8.0.50.0000.00816.66
8.0.30.0090.00917.03
8.0.20.0100.00917.40
8.0.10.0040.00416.89
8.0.00.0100.00716.65
7.4.330.0000.00515.55
7.4.320.0030.00316.45
7.4.300.0050.00216.39
7.4.290.0030.00316.50
7.4.280.0040.00416.39
7.4.270.0000.00716.57
7.4.260.0070.00016.40
7.4.250.0000.00716.43
7.4.240.0040.00416.52
7.4.230.0000.00716.46
7.4.220.0150.00316.45
7.4.210.0060.00916.63
7.4.200.0050.00216.70
7.4.160.0100.00616.47
7.4.150.0060.01217.40
7.4.140.0110.00917.86
7.4.130.0100.01416.47
7.4.120.0130.00716.48
7.4.110.0080.01316.46
7.4.100.0120.00616.64
7.4.90.0120.00616.40
7.4.80.0150.00919.39
7.4.70.0140.00716.39
7.4.60.0060.00916.49
7.4.50.0110.00416.46
7.4.40.0040.01216.59
7.4.30.0130.01016.39
7.4.00.0050.01214.96
7.3.330.0000.00613.30
7.3.320.0000.00513.16
7.3.310.0030.00316.33
7.3.300.0040.00416.30
7.3.290.0050.01116.23
7.3.280.0080.00816.28
7.3.270.0140.00717.40
7.3.260.0090.00816.40
7.3.250.0090.01016.22
7.3.240.0090.00916.39
7.3.230.0110.00516.54
7.3.210.0100.00716.24
7.3.200.0080.00816.37
7.3.190.0100.00716.53
7.3.180.0080.00816.24
7.3.170.0090.00616.19
7.3.160.0100.00516.14
7.3.120.0110.00714.63
7.3.110.0060.00614.97
7.3.100.0080.00414.94
7.3.90.0040.01114.61
7.3.80.0060.00614.74
7.3.70.0030.00714.45
7.3.60.0070.00714.37
7.3.50.0070.01014.70
7.3.40.0000.01014.68
7.3.30.0090.00014.75
7.3.20.0030.00716.56
7.3.10.0090.00316.55
7.3.00.0070.00716.45
7.2.330.0100.00716.56
7.2.320.0110.00716.58
7.2.310.0030.01316.35
7.2.300.0100.00716.29
7.2.290.0110.00516.66
7.2.250.0090.00915.05
7.2.240.0150.00315.16
7.2.230.0030.01214.97
7.2.220.0090.00614.72
7.2.210.0070.00714.49
7.2.200.0050.00514.70
7.2.190.0100.00314.92
7.2.180.0030.01214.95
7.2.170.0070.00414.93
7.2.60.0030.00916.46
7.1.330.0060.00915.95
7.1.320.0090.00615.86
7.1.310.0040.01115.76
7.1.300.0030.01115.91
7.1.290.0120.00615.90
7.1.280.0030.00915.48
7.1.270.0000.01515.46
7.1.260.0000.01215.74
7.1.200.0000.00915.56
7.1.80.0070.00618.16
7.1.70.0080.00917.00
7.1.60.0210.01334.87
7.1.50.0170.01734.64
7.1.40.0210.01234.54
7.1.30.0200.01434.46
7.1.20.0190.02034.41
7.1.10.0040.01116.46
7.1.00.0130.00416.56
7.0.200.0060.00916.63
7.0.190.0050.01216.52
7.0.180.0040.01316.24
7.0.170.0080.00816.11
7.0.160.0080.01316.30
7.0.150.0110.00616.18
7.0.140.0100.00316.30
7.0.130.0040.01416.38
7.0.120.0060.01116.35
7.0.110.0030.01516.21
7.0.100.0090.01116.33
7.0.90.0090.00716.30
7.0.80.0050.01416.08
7.0.70.0070.01316.02
7.0.60.0040.01316.09
7.0.50.0020.01316.31
7.0.40.0090.00616.50
7.0.30.0000.01416.36
7.0.20.0090.00616.33
7.0.10.0050.01116.41
7.0.00.0030.01316.30

preferences:
58.95 ms | 401 KiB | 5 Q