3v4l.org

run code in 300+ PHP versions simultaneously
<?php function config($key): string { $arr = ["protocol"=> "https", "port"=> "80", "website"=>"wwww.example.com"]; return array_key_exists($key, $arr) ? $arr[$key] : null; } function myfunc(){ echo config("port"); } myfunc();

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.5.30.0080.01019.07
8.5.20.0130.00619.18
8.5.10.0100.00716.82
8.5.00.0140.00920.08
8.4.180.0120.00925.69
8.4.170.0120.00923.91
8.4.160.0130.00823.96
8.4.150.0070.00616.88
8.4.140.0110.01117.52
8.4.130.0160.00317.77
8.4.120.0090.01122.21
8.4.110.0110.00922.38
8.4.100.0120.00917.74
8.4.90.0070.01320.36
8.4.80.0140.00718.71
8.4.70.0090.01120.84
8.4.60.0150.00320.47
8.4.50.0050.00320.60
8.4.40.0090.01217.77
8.4.30.0170.00417.70
8.4.20.0100.01019.35
8.4.10.0130.00620.54
8.3.300.0090.01120.73
8.3.290.0110.01022.59
8.3.280.0130.00818.16
8.3.270.0090.01016.59
8.3.260.0090.00216.50
8.3.250.0130.00419.04
8.3.240.0110.01016.23
8.3.230.0130.00716.50
8.3.220.0090.01119.11
8.3.210.0090.00716.54
8.3.200.0030.00516.59
8.3.190.0060.00217.37
8.3.180.0150.00919.04
8.3.170.0120.00617.03
8.3.160.0040.00418.44
8.3.150.0090.00918.49
8.3.140.0000.00816.87
8.3.130.0040.00418.36
8.3.120.0110.00718.98
8.3.110.0080.00018.29
8.3.100.0060.00316.61
8.3.90.0040.00418.32
8.3.80.0030.00618.30
8.3.70.0100.01016.63
8.3.60.0110.00418.30
8.3.50.0100.00318.37
8.3.40.0060.01218.76
8.3.30.0090.00618.51
8.3.20.0000.00819.14
8.3.10.0040.00421.73
8.3.00.0090.00017.80
8.2.300.0130.00918.67
8.2.290.0070.00520.33
8.2.280.0020.00518.66
8.2.270.0100.00019.02
8.2.260.0060.01216.95
8.2.250.0080.00018.29
8.2.240.0100.01016.38
8.2.230.0040.00420.94
8.2.220.0060.00324.06
8.2.210.0110.00726.77
8.2.200.0060.00318.16
8.2.190.0070.00716.58
8.2.180.0130.00716.75
8.2.170.0130.00318.78
8.2.160.0040.01122.96
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0050.00321.04
8.2.120.0000.00726.35
8.2.110.0030.00620.94
8.2.100.0070.00418.03
8.2.90.0000.00817.91
8.2.80.0090.00020.01
8.2.70.0080.00018.05
8.2.60.0040.00418.03
8.2.50.0030.00618.10
8.2.40.0040.00420.90
8.2.30.0050.00221.16
8.2.20.0000.00818.03
8.2.10.0040.00418.07
8.2.00.0030.00621.02
8.1.340.0090.01019.92
8.1.330.0140.00618.43
8.1.320.0100.01016.30
8.1.310.0040.00416.64
8.1.300.0000.00916.05
8.1.290.0040.00418.88
8.1.280.0080.00825.92
8.1.270.0040.00421.85
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0040.00422.46
8.1.230.0040.00722.01
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0040.00417.23
8.1.190.0090.00517.00
8.1.180.0050.00218.10
8.1.170.0000.00818.66
8.1.160.0030.00618.79
8.1.150.0030.00518.70
8.1.140.0040.00419.39
8.1.130.0040.00419.05
8.1.120.0000.00717.35
8.1.110.0030.00517.40
8.1.100.0070.00017.44
8.1.90.0050.00317.41
8.1.80.0000.00917.35
8.1.70.0080.00017.36
8.1.60.0080.00017.60
8.1.50.0050.00317.40
8.1.40.0080.00017.55
8.1.30.0000.00717.71
8.1.20.0000.00817.66
8.1.10.0040.00417.52
8.1.00.0030.00617.49
8.0.300.0050.00519.90
8.0.290.0000.00716.75
8.0.280.0040.00418.50
8.0.270.0030.00317.18
8.0.260.0030.00317.14
8.0.250.0000.00716.93
8.0.240.0070.00016.82
8.0.230.0100.00016.88
8.0.220.0000.00716.82
8.0.210.0040.00416.75
8.0.200.0000.00716.82
8.0.190.0040.00416.92
8.0.180.0040.00416.73
8.0.170.0050.00516.85
8.0.160.0040.00416.79
8.0.150.0030.00316.74
8.0.140.0030.00316.68
8.0.130.0060.00013.21
8.0.120.0040.00416.80
8.0.110.0000.00716.89
8.0.100.0000.00716.82
8.0.90.0000.00716.78
8.0.80.0000.01816.78
8.0.70.0080.00016.77
8.0.60.0050.00316.87
8.0.50.0040.00416.68
8.0.30.0100.00816.92
8.0.20.0070.01117.40
8.0.10.0000.00816.82
8.0.00.0100.00716.82
7.4.330.0030.00315.55
7.4.320.0030.00316.57
7.4.300.0030.00316.58
7.4.290.0020.00516.54
7.4.280.0030.00616.48
7.4.270.0060.00316.57
7.4.260.0000.00716.60
7.4.250.0000.00616.47
7.4.240.0070.00016.55
7.4.230.0070.00016.67
7.4.220.0000.00716.54
7.4.210.0070.01016.62
7.4.200.0000.00716.69
7.4.160.0090.00816.46
7.4.140.0100.00917.86
7.4.130.0160.00016.51
7.4.120.0110.00716.53
7.4.110.0120.00416.57
7.4.100.0080.00816.39
7.4.90.0070.01016.41
7.4.80.0200.00319.39
7.4.70.0060.01416.39
7.4.60.0080.00916.44
7.4.50.0110.00416.18
7.4.40.0130.00316.38
7.4.00.0050.01214.89
7.3.330.0030.00313.24
7.3.320.0060.00013.13
7.3.310.0000.00716.20
7.3.300.0000.00716.29
7.3.290.0040.00416.31
7.3.280.0100.00816.27
7.3.260.0120.00916.42
7.3.240.0070.01016.52
7.3.230.0170.00616.30
7.3.210.0060.01016.28
7.3.200.0100.00716.52
7.3.190.0100.00616.56
7.3.180.0100.01016.48
7.3.170.0000.01616.41
7.3.160.0080.00816.38
7.3.120.0080.00814.77
7.3.110.0070.01014.84
7.3.100.0050.01114.75
7.3.90.0090.00514.74
7.3.80.0020.01014.66
7.3.70.0100.00414.59
7.3.60.0030.01014.71
7.3.50.0080.00514.71
7.3.40.0140.00214.83
7.3.30.0090.00614.82
7.3.20.0040.00916.69
7.3.10.0040.00916.65
7.3.00.0040.00816.62
7.2.330.0070.01316.41
7.2.320.0090.00916.39
7.2.310.0090.01616.69
7.2.300.0130.00316.36
7.2.290.0110.01116.38
7.2.250.0070.01415.04
7.2.240.0070.01114.95
7.2.230.0050.00914.86
7.2.220.0070.01015.23
7.2.210.0050.00915.04
7.2.200.0080.00615.06
7.2.190.0050.00615.02
7.2.180.0080.00314.83
7.2.170.0050.01214.79
7.2.160.0100.00714.93
7.2.150.0090.00616.77
7.2.140.0090.00616.82
7.2.130.0030.01016.86
7.2.120.0130.00316.86
7.2.110.0070.01016.91
7.2.100.0060.00616.41
7.2.90.0000.01917.00
7.2.80.0070.01016.81
7.2.70.0060.00616.65
7.2.60.0060.00616.82
7.2.50.0030.00916.75
7.2.40.0720.01417.47
7.2.30.0630.01017.51
7.2.20.0990.00717.40
7.2.10.0620.00917.41
7.2.00.0480.01217.44
7.1.330.0080.00615.66
7.1.320.0060.01015.55
7.1.310.0100.00315.60
7.1.300.0000.01315.86
7.1.290.0020.01315.67
7.1.280.0090.00515.85
7.1.270.0050.00815.75
7.1.260.0020.01215.80
7.1.250.0110.00315.62
7.1.200.0000.01215.82
7.1.160.1530.00916.75
7.1.150.1370.01016.86
7.1.140.1170.01016.58
7.1.130.1100.01116.73
7.1.120.0920.01016.96
7.1.110.1110.00916.30
7.1.100.0860.00616.29
7.1.90.0900.01015.87
7.1.80.0810.00815.80
7.1.70.0750.00615.45
7.1.60.0970.01033.17
7.1.50.0840.01332.93
7.1.40.0900.00932.63
7.1.30.0880.01132.75
7.1.20.1010.01232.67
7.1.10.0910.00914.91
7.1.00.0930.00714.90

preferences:
95.39 ms | 1561 KiB | 5 Q