3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!in_array($status = $_GET['st'] ?? '', ['ac', 'ar'])) { echo "1: \$_GET invalid\n"; } $_GET['st'] = 'x'; if (!in_array($status = $_GET['st'] ?? '', ['ac', 'ar'])) { echo "2: \$_GET invalid\n"; } $_GET['st'] = 'ac'; if (!in_array($status = $_GET['st'] ?? '', ['ac', 'ar'])) { echo "3: \$_GET invalid\n"; } $_GET['st'] = 'ar'; if (!in_array($status = $_GET['st'] ?? '', ['ac', 'ar'])) { echo "4: \$_GET invalid\n"; }

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.120.0100.01020.49
8.4.110.0120.00722.39
8.4.100.0110.01017.53
8.4.90.0120.00822.52
8.4.80.0110.00417.49
8.4.70.0080.01217.80
8.4.60.0070.00218.61
8.4.50.0140.00620.17
8.4.40.0060.00319.33
8.4.30.0110.01120.21
8.4.20.0090.00918.70
8.4.10.0050.00317.96
8.3.250.0110.00718.79
8.3.240.0050.00416.34
8.3.230.0140.00616.46
8.3.220.0070.00117.22
8.3.210.0090.00620.90
8.3.200.0060.00316.91
8.3.190.0130.00717.22
8.3.180.0120.00618.49
8.3.170.0040.00417.29
8.3.160.0040.01518.32
8.3.150.0130.00618.60
8.3.140.0070.01117.46
8.3.130.0070.00016.77
8.3.120.0080.00019.02
8.3.110.0000.00920.94
8.3.100.0050.00316.41
8.3.90.0050.00326.77
8.3.80.0040.00417.97
8.3.70.0140.00418.43
8.3.60.0100.00718.20
8.3.50.0090.00818.30
8.3.40.0070.00718.82
8.3.30.0040.01118.64
8.3.20.0060.00321.35
8.3.10.0050.00322.04
8.3.00.0020.00522.43
8.2.290.0060.00520.35
8.2.280.0090.01018.38
8.2.270.0160.00317.10
8.2.260.0060.00316.37
8.2.250.0080.00016.86
8.2.240.0040.00418.93
8.2.230.0130.00322.58
8.2.220.0000.00824.06
8.2.210.0080.00026.77
8.2.200.0030.00616.38
8.2.190.0220.00016.75
8.2.180.0090.00918.29
8.2.170.0110.01122.96
8.2.160.0120.00622.08
8.2.150.0070.00024.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0060.00326.16
8.2.110.0060.00321.03
8.2.100.0090.00318.09
8.2.90.0000.00818.16
8.2.80.0040.00418.16
8.2.70.0040.00418.02
8.2.60.0050.00318.22
8.2.50.0040.00418.10
8.2.40.0040.00419.47
8.2.30.0000.00719.22
8.2.20.0040.00418.13
8.2.10.0000.00819.40
8.2.00.0080.00019.17
8.1.330.0100.00922.09
8.1.320.0140.00616.04
8.1.310.0040.00418.46
8.1.300.0000.01616.04
8.1.290.0030.00630.84
8.1.280.0110.00425.92
8.1.270.0080.00022.59
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0080.00022.18
8.1.230.0040.00722.75
8.1.220.0050.00317.79
8.1.210.0000.01118.77
8.1.200.0060.00317.23
8.1.190.0040.00417.22
8.1.180.0070.00018.10
8.1.170.0030.00618.51
8.1.160.0000.00718.87
8.1.150.0040.00418.93
8.1.140.0040.00420.27
8.1.130.0030.00320.13
8.1.120.0050.00217.50
8.1.110.0080.00017.46
8.1.100.0000.01117.34
8.1.90.0050.00217.45
8.1.80.0030.00517.36
8.1.70.0040.00417.40
8.1.60.0000.00817.59
8.1.50.0030.00917.43
8.1.40.0080.00017.43
8.1.30.0070.00317.47
8.1.20.0040.00417.66
8.1.10.0000.00817.50
8.1.00.0040.00417.39
8.0.300.0040.00419.61
8.0.290.0080.00016.63
8.0.280.0000.00818.45
8.0.270.0070.00017.25
8.0.260.0030.00320.03
8.0.250.0030.00316.88
8.0.240.0040.00416.93
8.0.230.0000.00716.89
8.0.220.0070.00016.89
8.0.210.0030.00316.81
8.0.200.0040.00416.93
8.0.190.0070.00016.91
8.0.180.0050.00216.89
8.0.170.0040.00416.95
8.0.160.0030.00716.89
8.0.150.0040.00416.78
8.0.140.0080.00016.90
8.0.130.0050.00013.30
8.0.120.0040.00416.81
8.0.110.0030.00516.75
8.0.100.0070.00016.78
8.0.90.0040.00416.77
8.0.80.0070.00916.91
8.0.70.0060.00316.85
8.0.60.0000.00816.68
8.0.50.0040.00416.84
8.0.30.0140.00317.07
8.0.20.0060.01316.83
8.0.10.0080.00016.83
8.0.00.0110.00716.81
7.4.330.0020.00215.55
7.4.320.0080.00016.45
7.4.300.0030.00316.50
7.4.290.0030.00316.59
7.4.280.0070.00016.48
7.4.270.0030.00316.58
7.4.260.0000.00513.27
7.4.250.0080.00016.49
7.4.240.0020.00616.48
7.4.230.0000.00716.61
7.4.220.0020.00516.47
7.4.210.0070.01016.55
7.4.200.0030.00316.66
7.4.130.0140.00416.48
7.4.120.0060.01116.34
7.4.110.0060.01016.39
7.4.100.0030.01316.41
7.4.90.0090.00916.51
7.4.80.0090.01519.39
7.4.70.0090.00916.63
7.4.60.0090.01216.35
7.4.50.0040.01116.47
7.4.40.0130.00716.53
7.4.00.0040.00715.23
7.3.330.0070.00016.08
7.3.320.0030.00313.24
7.3.310.0030.00516.19
7.3.300.0000.00616.21
7.3.290.0080.00616.23
7.3.260.0100.00816.33
7.3.240.0060.01116.31
7.3.230.0100.00716.52
7.3.210.0080.01416.46
7.3.200.0060.01016.54
7.3.190.0150.00916.62
7.3.180.0080.00716.50
7.3.170.0090.00916.35
7.3.160.0120.00916.51
7.3.100.0070.00714.75
7.3.90.0100.01014.73
7.3.80.0030.01314.84
7.3.70.0040.01314.78
7.3.60.0000.01914.61
7.3.50.0070.00714.65
7.3.40.0110.00314.66
7.3.30.0100.00314.59
7.3.20.0330.01714.85
7.3.10.0830.00314.74
7.3.00.0490.00014.68
7.2.330.0070.01416.64
7.2.320.0070.01016.73
7.2.310.0110.00516.64
7.2.300.0100.01016.49
7.2.290.0130.00316.54
7.2.220.0070.01114.60
7.2.210.0060.01114.83
7.2.200.0110.00815.12
7.2.190.0030.01715.16
7.2.180.0090.00615.01
7.2.170.0030.01315.06
7.2.160.0050.01015.11
7.2.150.0210.00915.13
7.2.140.0370.01014.86
7.2.130.0300.01314.84
7.2.120.0240.00814.96
7.2.110.0390.00715.06
7.2.100.0830.00615.12
7.2.90.0380.00314.76
7.2.80.0380.00714.92
7.2.70.0340.00915.11
7.2.60.0410.00014.80
7.2.50.0480.00915.07
7.2.40.0380.00914.97
7.2.30.0500.00415.17
7.2.20.0210.01115.23
7.2.10.0530.00815.07
7.2.00.0510.00914.84
7.1.320.0300.01113.90
7.1.310.0350.00714.15
7.1.300.0250.00813.82
7.1.290.0250.00313.84
7.1.280.0240.01213.83
7.1.270.0270.00813.89
7.1.260.0350.00613.67
7.1.250.0350.01013.90

preferences:
28.05 ms | 403 KiB | 5 Q