3v4l.org

run code in 300+ PHP versions simultaneously
<?php $days_of_week = array("monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"); function stringParse(array $string) { for($i = 0; $i < count($string); $i++) { $string = str_replace($string[$i], substr($string[$i],0,3), $string); echo $string[$i].'<br />'; } return $string; } $days_of_week = stringParse($days_of_week); foreach($days_of_week as $stry) {echo $stry.'<br />';}

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.60.0120.00316.50
8.3.50.0070.00718.17
8.3.40.0120.00318.57
8.3.30.0100.01018.71
8.3.20.0040.00420.21
8.3.10.0030.00718.77
8.3.00.0070.00023.52
8.2.180.0140.00716.47
8.2.170.0000.01522.96
8.2.160.0140.00722.10
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0000.00820.75
8.2.120.0040.00426.35
8.2.110.0060.00319.34
8.2.100.0090.00318.05
8.2.90.0040.00419.20
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0030.00517.93
8.2.50.0080.00018.09
8.2.40.0000.00822.10
8.2.30.0000.00719.52
8.2.20.0030.00617.70
8.2.10.0020.00518.05
8.2.00.0060.00318.11
8.1.270.0040.00422.08
8.1.260.0040.00428.09
8.1.250.0000.00828.09
8.1.240.0060.00322.65
8.1.230.0100.00017.76
8.1.220.0000.00817.74
8.1.210.0090.00018.77
8.1.200.0030.00617.35
8.1.190.0080.00017.00
8.1.180.0070.00018.10
8.1.170.0050.00518.46
8.1.160.0040.00420.80
8.1.150.0000.00720.71
8.1.140.0070.00319.58
8.1.130.0030.00317.64
8.1.120.0000.00817.54
8.1.110.0070.00017.45
8.1.100.0040.00417.36
8.1.90.0030.00517.36
8.1.80.0040.00417.40
8.1.70.0000.00717.46
8.1.60.0000.00817.54
8.1.50.0090.00017.51
8.1.40.0050.00317.54
8.1.30.0050.00317.59
8.1.20.0000.00817.46
8.1.10.0070.00017.55
8.1.00.0020.00517.39
8.0.300.0070.00018.77
8.0.290.0060.00316.63
8.0.280.0000.00718.43
8.0.270.0000.00717.18
8.0.260.0030.00317.21
8.0.250.0030.00316.96
8.0.240.0070.00016.89
8.0.230.0080.00016.89
8.0.220.0040.00416.88
8.0.210.0050.00316.88
8.0.200.0070.00016.84
8.0.190.0000.00716.86
8.0.180.0080.00016.83
8.0.170.0000.00816.96
8.0.160.0070.00016.85
8.0.150.0030.00416.88
8.0.140.0070.00016.75
8.0.130.0050.00013.25
8.0.120.0000.00816.84
8.0.110.0040.00416.80
8.0.100.0070.00016.73
8.0.90.0040.00416.78
8.0.80.0130.00316.81
8.0.70.0070.00016.85
8.0.60.0030.00516.85
8.0.50.0040.00416.78
8.0.30.0120.00517.13
8.0.20.0110.01217.40
8.0.10.0040.00416.99
8.0.00.0090.00916.70
7.4.330.0000.00516.77
7.4.320.0030.00316.59
7.4.300.0070.00016.43
7.4.290.0000.00716.59
7.4.280.0000.00816.41
7.4.270.0030.00316.50
7.4.260.0040.00416.66
7.4.250.0070.00016.39
7.4.240.0070.00016.59
7.4.230.0040.00416.55
7.4.220.0070.01016.63
7.4.210.0030.01416.50
7.4.200.0000.00716.69
7.4.160.0120.00316.40
7.4.150.0090.01117.40
7.4.140.0100.01517.86
7.4.130.0100.00616.55
7.4.120.0130.00816.52
7.4.110.0120.01016.32
7.4.100.0070.01016.49
7.4.90.0140.00416.54
7.4.80.0090.01219.39
7.4.70.0140.00416.64
7.4.60.0060.01316.55
7.4.50.0110.00416.63
7.4.40.0080.00816.36
7.4.30.0210.00516.56
7.4.10.0140.00716.19
7.4.00.0100.00715.75
7.3.330.0000.00813.30
7.3.320.0060.00013.16
7.3.310.0070.00016.38
7.3.300.0060.00016.18
7.3.290.0000.00716.17
7.3.280.0060.01116.31
7.3.270.0070.01017.40
7.3.260.0070.01416.59
7.3.250.0120.00916.48
7.3.240.0110.00916.39
7.3.230.0100.01016.39
7.3.210.0080.01616.38
7.3.200.0150.00919.39
7.3.190.0030.01716.36
7.3.180.0110.00816.55
7.3.170.0060.00916.64
7.3.160.0060.01016.51
7.3.130.0070.01416.49
7.3.120.0060.00916.26
7.3.110.0090.00616.23
7.3.100.0060.00616.58
7.3.90.0100.00316.50
7.3.80.0060.00916.34
7.3.70.0000.00916.24
7.3.60.0140.00316.44
7.3.50.0100.00716.39
7.3.40.0000.01016.16
7.3.30.0000.01416.39
7.3.20.0030.00618.25
7.3.10.0100.00718.13
7.3.00.0030.00718.20
7.2.330.0150.00916.48
7.2.320.0030.01416.51
7.2.310.0090.01216.59
7.2.300.0090.00616.77
7.2.290.0100.00716.86
7.2.260.0030.01316.61
7.2.250.0100.01016.55
7.2.240.0060.00916.40
7.2.230.0100.00616.74
7.2.220.0060.00616.39
7.2.210.0130.00316.50
7.2.200.0060.00316.52
7.2.190.0130.00316.43
7.2.180.0090.00316.54
7.2.170.0070.00716.77
7.2.160.0070.00316.71
7.2.150.0070.00718.61
7.2.140.0030.00618.49
7.2.130.0030.01018.41
7.2.120.0150.00318.45
7.2.110.0000.01118.50
7.2.100.0090.00918.36
7.2.90.0000.01618.57
7.2.80.0050.00717.66
7.2.70.0030.00718.56
7.2.60.0180.01017.62
7.2.50.0040.00718.43
7.2.40.0090.00318.38
7.2.30.0040.01118.55
7.2.20.0130.00318.48
7.2.10.0000.01418.51
7.2.00.0060.00718.79
7.1.330.0080.00617.35
7.1.320.0090.00617.22
7.1.310.0070.00317.25
7.1.300.0000.01317.28
7.1.290.0090.00317.36
7.1.280.0030.01017.35
7.1.270.0040.01117.50
7.1.260.0070.00717.26
7.1.250.0030.00817.38
7.1.240.0070.01017.29
7.1.230.0070.01017.33
7.1.220.0040.00817.20
7.1.210.0090.00617.22
7.1.200.0060.00716.46
7.1.190.0070.00717.25
7.1.180.0040.00417.44
7.1.170.0060.00617.20
7.1.160.0100.00317.36
7.1.150.0070.00717.37
7.1.140.0030.00617.29
7.1.130.0070.00317.34
7.1.120.0060.00917.36
7.1.110.0000.01217.37
7.1.100.0050.00717.52
7.1.90.0030.00917.34
7.1.80.0030.01417.38
7.1.70.0050.00717.11
7.1.60.0070.01118.41
7.1.50.0060.01217.09
7.1.40.0060.00917.34
7.1.30.0000.00917.52
7.1.20.0040.00817.53
7.1.10.0000.01517.46
7.1.00.0080.03819.99
7.0.330.0000.01317.28
7.0.320.0070.00717.15
7.0.310.0120.00017.09
7.0.300.0000.01317.06
7.0.290.0060.00916.86
7.0.280.0030.01216.94
7.0.270.0070.00417.01
7.0.260.0040.00817.05
7.0.250.0030.00617.24
7.0.240.0050.00516.91
7.0.230.0070.00317.16
7.0.220.0090.00617.03
7.0.210.0030.00917.14
7.0.200.0060.00716.94
7.0.190.0090.00616.75
7.0.180.0070.00716.87
7.0.170.0060.00916.94
7.0.160.0000.00917.20
7.0.150.0060.00916.90
7.0.140.0040.01216.95
7.0.130.0040.00716.88
7.0.120.0060.01017.18
7.0.110.0100.00316.83
7.0.100.0000.01116.73
7.0.90.0000.01216.98
7.0.80.0040.00416.91
7.0.70.0040.00817.06
7.0.60.0240.02318.56
7.0.50.0060.02517.42
7.0.40.0080.03217.61
7.0.30.0120.03217.45
7.0.20.0270.03517.66
7.0.10.0040.02717.61
7.0.00.0080.02817.61
5.6.400.0100.00316.12
5.6.390.0060.00915.64
5.6.380.0040.01116.00
5.6.370.0090.00315.89
5.6.360.0030.01016.35
5.6.350.0030.00616.26
5.6.340.0000.01216.01
5.6.330.0070.00716.04
5.6.320.0060.00616.09
5.6.310.0030.01115.99
5.6.300.0030.01315.99
5.6.290.0040.00715.78
5.6.280.0030.01015.97
5.6.270.0090.00615.96
5.6.260.0140.00015.58
5.6.250.0060.00915.75
5.6.240.0060.01016.10
5.6.230.0060.01015.82
5.6.220.0030.01315.93
5.6.210.0050.04718.30
5.6.200.0050.03217.11
5.6.190.0050.02618.28
5.6.180.0230.03718.18
5.6.170.0180.02018.24
5.6.160.0030.02718.17
5.6.150.0050.02716.96
5.6.140.0030.04517.02
5.6.130.0040.04617.06
5.6.120.0020.05218.51
5.6.110.0080.04118.49
5.6.100.0070.04518.40
5.6.90.0070.04018.42
5.6.80.0100.03018.23
5.6.70.0100.00315.87
5.6.60.0060.00915.92
5.6.50.0030.01415.72
5.6.40.0000.01216.00
5.6.30.0070.00715.73
5.6.20.0030.00715.66
5.6.10.0070.01015.77
5.6.00.0070.01015.81
5.5.380.0040.01215.74
5.5.370.0110.00415.57
5.5.360.0100.00715.86
5.5.350.0130.04218.08
5.5.340.0060.03016.87
5.5.330.0090.04018.01
5.5.320.0360.03717.90
5.5.310.0110.02317.83
5.5.300.0070.04316.98
5.5.290.0050.02316.94
5.5.280.0070.03518.32
5.5.270.0070.04718.23
5.5.260.0100.04018.46
5.5.250.0080.04018.10
5.5.240.0140.03917.95
5.5.230.0030.01015.69
5.5.220.0070.00315.70
5.5.210.0060.00815.71
5.5.200.0040.01115.60
5.5.190.0070.00415.82
5.5.180.0000.01415.70
5.5.170.0090.00615.91
5.5.160.0040.01415.76
5.5.150.0000.01416.08
5.5.140.0000.01516.07
5.5.130.0110.00015.56
5.5.120.0070.00315.81
5.5.110.0030.00915.84
5.5.100.0000.01215.47
5.5.90.0000.01515.63
5.5.80.0120.00415.55
5.5.70.0030.01015.75
5.5.60.0090.00315.62
5.5.50.0050.00815.36
5.5.40.0000.01415.72
5.5.30.0030.01015.74
5.5.20.0030.00615.71
5.5.10.0070.01015.75
5.5.00.0030.01015.60

preferences:
56.39 ms | 400 KiB | 5 Q