3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { static $array = array(); $i = 0; while ($i < 1000000) { $array[] = $i; $i++; } $key = 9999; $exists = array_key_exists($key, $array); if ($exists === true) echo 'exists'; else echo 'does not exist'; } foo();

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.0340.03033.47
8.3.50.0230.02836.12
8.3.40.0390.02035.57
8.3.30.0290.02336.24
8.3.20.0100.01937.06
8.3.10.0120.01539.73
8.3.00.0270.03135.29
8.2.180.0500.02033.70
8.2.170.0460.01735.89
8.2.160.0230.03037.36
8.2.150.0100.02036.13
8.2.140.0140.01436.91
8.2.130.0230.02937.45
8.2.120.0040.01539.02
8.2.110.0260.01637.36
8.2.100.0280.01234.85
8.2.90.0060.02235.21
8.2.80.0160.01234.67
8.2.70.0130.01734.51
8.2.60.0180.01435.11
8.2.50.0150.01534.63
8.2.40.0140.01435.46
8.2.30.0200.01035.13
8.2.20.0100.01634.76
8.2.10.0070.02135.12
8.2.00.0140.01734.74
8.1.280.0560.03350.04
8.1.270.0200.00739.70
8.1.260.0160.01037.27
8.1.250.0190.00639.24
8.1.240.0100.02339.18
8.1.230.0340.00037.99
8.1.220.0210.00334.74
8.1.210.0080.01735.82
8.1.200.0040.02234.44
8.1.190.0100.01634.18
8.1.180.0130.01034.16
8.1.170.0120.01235.53
8.1.160.0100.01339.00
8.1.150.0240.00035.93
8.1.140.0180.00734.48
8.1.130.0190.00434.74
8.1.120.0060.01634.54
8.1.110.0210.00334.59
8.1.100.0060.01634.50
8.1.90.0100.01334.46
8.1.80.0100.01334.45
8.1.70.0070.01734.40
8.1.60.0160.01334.50
8.1.50.0140.01434.63
8.1.40.0230.01034.55
8.1.30.0100.01734.55
8.1.20.0170.01034.66
8.1.10.0300.02350.46
8.1.00.0410.01050.48
8.0.300.0330.01052.92
8.0.290.0260.01949.66
8.0.280.0260.01351.42
8.0.270.0190.02550.06
8.0.260.0160.02350.11
8.0.250.0240.01449.76
8.0.240.0260.02049.82
8.0.230.0270.01749.94
8.0.220.0230.01649.78
8.0.210.0190.01949.74
8.0.200.0270.01349.79
8.0.190.0330.01649.77
8.0.180.0240.02749.77
8.0.170.0380.00949.83
8.0.160.0360.02649.70
8.0.150.0330.01649.85
8.0.140.0330.03049.67
8.0.130.0270.02046.35
8.0.120.0270.02049.75
8.0.110.0290.01949.77
8.0.100.0170.02749.70
8.0.90.0240.02149.66
8.0.80.0430.05249.80
8.0.70.0280.02149.81
8.0.60.0100.03449.61
8.0.50.0160.02949.87
8.0.30.0700.05049.97
8.0.20.0910.05649.97
8.0.10.0170.03049.95
8.0.00.0590.05049.56
7.4.330.0250.01446.95
7.4.320.0270.01349.37
7.4.300.0190.01949.52
7.4.290.0300.02349.46
7.4.280.0390.02949.29
7.4.270.0200.02749.37
7.4.260.0230.03049.45
7.4.250.0210.03149.46
7.4.240.0180.02849.34
7.4.230.0170.03149.27
7.4.220.0390.07149.42
7.4.210.0430.04649.48
7.4.200.0200.03049.40
7.4.160.0700.03549.40
7.4.150.0670.04749.54
7.4.140.0770.05749.55
7.4.130.0750.04349.43
7.4.120.0620.04249.42
7.4.110.0630.04349.41
7.4.100.0510.06949.41
7.4.90.0560.06349.39
7.4.80.0570.08049.37
7.4.70.0500.06349.50
7.4.60.0840.06549.33
7.4.50.0030.02849.16
7.4.40.0600.04649.55
7.4.30.0540.05749.33
7.4.00.0230.04548.00
7.3.330.0270.02746.37
7.3.320.0260.01746.09
7.3.310.0260.02349.16
7.3.300.0240.02449.11
7.3.290.0440.04749.11
7.3.280.0530.07149.24
7.3.270.0590.05249.33
7.3.260.0650.04949.20
7.3.240.0750.03949.34
7.3.230.0920.06249.15
7.3.210.0610.04549.46
7.3.200.0650.04249.61
7.3.190.0500.07149.55
7.3.180.0550.05849.43
7.3.170.0330.07249.28
7.3.160.0740.04849.38
7.2.330.0770.07449.64
7.2.320.0630.05749.45
7.2.310.0580.05249.30
7.2.300.0550.05849.41
7.2.290.0490.06849.50
7.2.60.0860.04150.88
7.2.00.0230.02953.14
7.1.200.0890.03349.66
7.1.100.0060.03552.02
7.1.70.1090.02850.45
7.1.60.0130.06851.24
7.1.50.0160.02550.70
7.1.00.0030.12056.22
7.0.200.8860.03747.93
7.0.140.0100.11055.96
7.0.110.5330.10352.86
7.0.100.2770.07352.88
7.0.90.1830.08752.86
7.0.80.0170.11352.92
7.0.70.8830.10752.89
7.0.61.0030.10752.98
7.0.51.0370.10053.36
7.0.40.0400.11352.07
7.0.30.0370.11352.21
7.0.20.7100.12751.93
7.0.10.9130.11752.20
7.0.00.7870.10052.22
5.6.260.0300.07385.27
5.6.250.0300.08785.24
5.6.240.0300.10085.45
5.6.230.0400.13085.28
5.6.220.0200.14085.04
5.6.210.0170.11085.21
5.6.200.0300.13085.79
5.6.190.0230.14085.79
5.6.180.0600.11785.66
5.6.170.0400.08785.72
5.6.160.0370.13085.84
5.6.150.0170.08785.79
5.6.140.0400.10385.85
5.6.130.0270.13385.70
5.6.120.0330.11785.54
5.6.110.0330.13085.75
5.6.100.0370.15385.68
5.6.90.0270.14785.74
5.6.80.0430.10385.25
5.6.70.0300.14385.17
5.6.60.0300.13784.95
5.6.50.0200.13385.12
5.6.40.0370.12785.27
5.6.30.0370.13384.90
5.6.20.0470.12084.88
5.6.10.0170.13785.02
5.6.00.0200.16085.10
5.5.380.0200.08784.95
5.5.370.0430.14385.09
5.5.360.0270.18784.86
5.5.350.0400.13385.04
5.5.340.0300.10385.55
5.5.330.0330.12385.59
5.5.320.0330.15385.42
5.5.310.0370.12385.63
5.5.300.0400.11385.60
5.5.290.0300.07785.51
5.5.280.0270.11785.54
5.5.270.0300.11385.50
5.5.260.0300.12785.54
5.5.250.0230.10085.44
5.5.240.0370.11384.89
5.5.230.0370.10784.83
5.5.220.0270.15084.90
5.5.210.0370.12385.04
5.5.200.0230.13385.01
5.5.190.0330.14084.89
5.5.180.0400.10084.98
5.5.160.0300.14384.89
5.5.150.0270.15384.94
5.5.140.0300.14384.80
5.5.130.0400.13384.76
5.5.120.0430.13084.80
5.5.110.0300.12084.96
5.5.100.0200.11784.70
5.5.90.0200.10384.81
5.5.80.0330.11784.84
5.5.70.0170.12384.80
5.5.60.0200.08784.68
5.5.50.0330.13784.73
5.5.40.0270.08084.78
5.5.30.0200.12384.73
5.5.20.0130.09084.85
5.5.10.0400.12084.83
5.5.00.0230.13784.65
5.4.450.0100.09384.25
5.4.440.0130.10083.85
5.4.430.0130.14084.16
5.4.420.0230.13383.90
5.4.410.0370.12783.77
5.4.400.0300.13083.54
5.4.390.0200.14783.56
5.4.380.0330.14083.55
5.4.370.0330.11083.52
5.4.360.0300.13783.71
5.4.350.0370.12083.72
5.4.340.0400.12083.68
5.4.320.0370.14383.74
5.4.310.0230.09083.61
5.4.300.0200.12083.64
5.4.290.0200.13083.51
5.4.280.0170.11383.55
5.4.270.0270.14783.57
5.4.260.0270.08783.66
5.4.250.0400.08083.67
5.4.240.0100.08783.55
5.4.230.0130.08783.92
5.4.220.0270.14083.56
5.4.210.0130.08783.75
5.4.200.0230.07383.62
5.4.190.0100.15383.56
5.4.180.0370.06383.75
5.4.170.0300.13783.62
5.4.160.0330.13083.63
5.4.150.0270.14783.55
5.4.140.0230.11381.00
5.4.130.0300.13781.02
5.4.120.0100.09080.91
5.4.110.0230.12381.14
5.4.100.0270.11081.05
5.4.90.0300.11381.10
5.4.80.0300.06780.95
5.4.70.0100.08781.11
5.4.60.0270.10781.25
5.4.50.0170.13781.07
5.4.40.0330.11781.10
5.4.30.0270.09380.96
5.4.20.0230.12780.93
5.4.10.0300.12781.00
5.4.00.0230.07380.27
5.3.290.0300.11777.86
5.3.280.0370.09077.62
5.3.270.0230.12077.94
5.3.260.0270.13777.74
5.3.250.0230.12777.80
5.3.240.0200.13077.77
5.3.230.0130.13377.76
5.3.220.0170.12377.74
5.3.210.0230.14077.89
5.3.200.0170.13777.75
5.3.190.0170.09077.67
5.3.180.0270.13777.89
5.3.170.0270.08077.80
5.3.160.0170.09777.81
5.3.150.0200.12077.71
5.3.140.0330.13777.63
5.3.130.0230.13377.80
5.3.120.0330.11077.74
5.3.110.0100.13777.70
5.3.100.0370.12377.81
5.3.90.0270.13077.42
5.3.80.0130.09077.20
5.3.70.0300.10076.96
5.3.60.0200.12377.07
5.3.50.0500.09777.13
5.3.40.0200.08377.06
5.3.30.0200.08777.17
5.3.20.0270.12776.80
5.3.10.0270.12376.70
5.3.00.0230.13776.59
5.2.170.0200.09074.89
5.2.160.0170.14074.77
5.2.150.0070.10374.81
5.2.140.0200.09774.89
5.2.130.0300.13774.77
5.2.120.0200.12774.72
5.2.110.0270.13774.78
5.2.100.0270.13774.86
5.2.90.0200.13074.74
5.2.80.0200.11774.72
5.2.70.0170.13374.83
5.2.60.0230.11074.88
5.2.50.0200.13374.72
5.2.40.0230.16774.48
5.2.30.0270.17374.61
5.2.20.0170.14074.56
5.2.10.0370.13074.41
5.2.00.0570.237232.53
5.1.60.0770.260263.66
5.1.50.0730.280263.82
5.1.40.1000.247263.66
5.1.30.1070.233263.96
5.1.20.0830.270263.93
5.1.10.0700.270263.67
5.1.00.1100.233263.57
5.0.50.1330.313262.79
5.0.40.1000.343262.71
5.0.30.0830.353262.62
5.0.20.1000.327262.60
5.0.10.0670.373262.59
5.0.00.0600.380262.54
4.4.90.0930.340260.99
4.4.80.0500.363260.88
4.4.70.0600.310260.98
4.4.60.1030.323261.02
4.4.50.0900.313261.06
4.4.40.0770.363260.95
4.4.30.1170.303261.09
4.4.20.0930.330260.95
4.4.10.0630.370260.93
4.4.00.1230.313260.92
4.3.110.0970.313260.87
4.3.100.0700.360260.80
4.3.90.0530.360261.00
4.3.80.0470.330260.78
4.3.70.0730.333260.99
4.3.60.0670.307260.77
4.3.50.0700.317260.87
4.3.40.0570.330260.90
4.3.30.0730.320259.77
4.3.20.1530.240259.58
4.3.10.0600.287259.64
4.3.00.0500.303259.54

preferences:
51 ms | 401 KiB | 5 Q