3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($a) { fwrite($a, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'); fseek($a, 0); fwrite($a, '1234567890'); fseek($a, 0); var_dump(fread($a, 1024)); fclose($a); } $a = fopen('php://temp', 'a+'); test($a); echo '-------------------' . PHP_EOL; $a = fopen(tempnam(sys_get_temp_dir(), 'hello'), 'a+'); test($a);

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.0080.01518.59
8.4.10.0030.00719.43
8.3.150.0080.01117.23
8.3.140.0000.00820.66
8.3.130.0100.01018.40
8.3.120.0060.00319.04
8.3.110.0040.00420.94
8.3.100.0040.00424.06
8.3.90.0060.01126.77
8.3.80.0030.00619.36
8.3.70.0070.00718.30
8.3.60.0100.00718.55
8.3.50.0170.00518.44
8.3.40.0090.00618.55
8.3.30.0170.00018.70
8.3.20.0050.00318.73
8.3.10.0040.00423.40
8.3.00.0000.00921.76
8.2.270.0160.00322.34
8.2.260.0030.00616.68
8.2.250.0090.00016.71
8.2.240.0090.00617.32
8.2.230.0060.00322.58
8.2.220.0080.00037.54
8.2.210.0000.00926.77
8.2.200.0060.00318.88
8.2.190.0070.00718.29
8.2.180.0100.00718.41
8.2.170.0090.00622.96
8.2.160.0110.00419.29
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00419.95
8.2.110.0030.00620.95
8.2.100.0070.00418.09
8.2.90.0060.00318.05
8.2.80.0060.00318.00
8.2.70.0090.00018.05
8.2.60.0000.00818.22
8.2.50.0060.00318.10
8.2.40.0000.00921.24
8.2.30.0040.00420.64
8.2.20.0000.00818.04
8.2.10.0040.00417.97
8.2.00.0040.00419.27
8.1.310.0040.00416.85
8.1.300.0050.00320.09
8.1.290.0110.00030.84
8.1.280.0130.00325.92
8.1.270.0040.00420.60
8.1.260.0000.00826.35
8.1.250.0030.00528.09
8.1.240.0100.00021.95
8.1.230.0000.01122.70
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0000.00817.22
8.1.190.0060.00317.22
8.1.180.0040.00418.10
8.1.170.0050.00318.59
8.1.160.0080.00018.95
8.1.150.0040.00418.89
8.1.140.0000.00717.39
8.1.130.0070.00320.06
8.1.120.0000.00717.34
8.1.110.0070.00017.29
8.1.100.0000.00817.30
8.1.90.0070.00417.37
8.1.80.0030.00317.35
8.1.70.0070.00017.30
8.1.60.0030.00817.62
8.1.50.0000.00717.55
8.1.40.0000.00817.53
8.1.30.0060.00317.63
8.1.20.0040.00417.60
8.1.10.0060.00317.43
8.1.00.0060.00317.33
8.0.300.0000.00919.54
8.0.290.0000.00816.73
8.0.280.0030.00518.52
8.0.270.0000.00716.90
8.0.260.0030.00320.21
8.0.250.0030.00316.98
8.0.240.0070.00016.98
8.0.230.0070.00017.02
8.0.220.0000.00716.91
8.0.210.0000.00716.93
8.0.200.0030.00316.95
8.0.190.0030.00416.94
8.0.180.0040.00416.91
8.0.170.0030.00616.97
8.0.160.0040.00416.88
8.0.150.0080.00016.90
8.0.140.0070.00016.86
8.0.130.0000.00613.39
8.0.120.0000.00716.76
8.0.110.0050.00216.79
8.0.100.0040.00416.80
8.0.90.0040.00316.82
8.0.80.0100.00516.87
8.0.70.0080.00016.96
8.0.60.0000.00716.97
8.0.50.0000.00816.94
8.0.30.0110.01117.25
8.0.20.0090.01217.40
8.0.10.0080.00016.86
8.0.00.0110.01016.79
7.4.330.0000.00615.55
7.4.320.0000.00616.57
7.4.300.0030.00316.67
7.4.290.0040.00416.58
7.4.280.0000.00716.50
7.4.270.0070.00016.44
7.4.260.0040.00416.50
7.4.250.0070.00016.41
7.4.240.0000.00716.43
7.4.230.0030.00316.27
7.4.220.0080.00016.50
7.4.210.0030.01216.59
7.4.200.0000.00716.60
7.4.160.0130.00816.54
7.4.140.0120.01217.86
7.4.130.0150.00316.71
7.4.120.0080.01116.56
7.4.110.0070.01016.51
7.4.100.0100.00716.47
7.4.90.0110.00716.59
7.4.80.0070.01119.39
7.4.70.0110.00516.34
7.4.60.0070.01016.40
7.4.50.0140.00416.32
7.4.40.0120.00616.54
7.4.00.0070.01014.83
7.3.330.0000.00513.25
7.3.320.0050.00013.23
7.3.310.0050.00216.32
7.3.300.0030.00316.18
7.3.290.0030.00316.23
7.3.280.0090.00916.29
7.3.260.0110.00916.43
7.3.240.0110.00916.30
7.3.230.0100.00716.34
7.3.210.0030.01616.47
7.3.200.0090.00616.18
7.3.190.0130.00316.36
7.3.180.0100.00716.29
7.3.170.0140.00416.38
7.3.160.0100.00616.57
7.3.120.0000.01814.83
7.3.110.0030.01414.99
7.3.100.0060.01014.67
7.3.90.0100.01014.83
7.3.80.0060.00914.90
7.3.70.0040.00414.50
7.3.60.0070.00714.67
7.3.50.0040.01114.48
7.3.40.0070.00714.82
7.3.30.0060.00914.80
7.3.20.0060.00616.52
7.3.10.0000.01416.66
7.3.00.0030.00916.66
7.2.330.0070.01116.48
7.2.320.0070.01016.57
7.2.310.0030.01416.64
7.2.300.0030.01416.74
7.2.290.0080.00816.48
7.2.250.0070.01014.79
7.2.240.0090.00914.98
7.2.230.0070.01015.14
7.2.220.0050.00415.24
7.2.210.0000.01515.11
7.2.200.0070.00315.16
7.2.190.0120.00315.07
7.2.180.0000.01514.84
7.2.170.0080.00314.94
7.2.110.0100.01016.75
7.2.90.1150.00314.66
7.2.80.0990.01014.73
7.2.70.1130.00315.07
7.2.60.1370.00714.77
7.2.50.0720.00714.92
7.2.40.1290.00714.79
7.2.30.1430.00714.91
7.2.20.1330.01014.89
7.2.10.1570.00614.81
7.2.00.1520.00314.99
7.1.330.0060.00915.78
7.1.320.0060.00315.74
7.1.310.0080.00815.92
7.1.300.0080.00815.78
7.1.290.0030.00715.92
7.1.280.0080.00415.72
7.1.270.0040.01115.59
7.1.260.0070.00315.50
7.1.210.1090.01013.89
7.1.200.0980.00013.64
7.1.190.1050.00613.95
7.1.180.1100.00613.87
7.1.170.0590.01213.95
7.1.160.1070.01013.55
7.1.150.1400.01013.87
7.1.140.1480.01013.98
7.1.130.0970.00313.92
7.1.120.1080.00713.86
7.1.110.1330.00314.01
7.1.100.1600.00313.91
7.1.90.1450.01413.91
7.1.80.1340.00313.64
7.1.70.2070.01013.85
7.1.60.1560.01931.90
7.1.50.1110.01631.84
7.1.40.1340.01331.77
7.1.30.1030.01331.78
7.1.20.1100.01331.88
7.1.10.1080.01313.65
7.1.00.1100.00313.68

preferences:
75.67 ms | 403 KiB | 5 Q