3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_SESSION["cart_item"] = array('1', '2', '3'); $_GET['code'] = '3'; if(isset($_SESSION["cart_item"])) { if(in_array($_GET['code'], $_SESSION["cart_item"])){ echo "hiiii"; }else{ echo "byeee";} }else { $itemArray = array( $_GET['code'] => array('pcode'=> $_GET['code']) ); $_SESSION["cart_item"] = $itemArray; }

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.0170.00317.64
8.4.10.0060.00317.69
8.3.140.0030.01016.53
8.3.130.0030.00518.50
8.3.120.0130.00618.95
8.3.110.0070.00716.55
8.3.100.0060.00316.45
8.3.90.0050.00326.77
8.3.80.0060.00318.68
8.3.70.0070.01016.50
8.3.60.0150.00716.38
8.3.50.0140.00621.93
8.3.40.0140.00718.78
8.3.30.0140.00018.84
8.3.20.0040.00419.41
8.3.10.0040.00421.94
8.3.00.0100.00017.93
8.2.260.0110.00716.73
8.2.250.0030.01616.43
8.2.240.0000.00917.38
8.2.230.0000.00920.94
8.2.220.0030.00637.54
8.2.210.0090.00626.77
8.2.200.0100.00016.63
8.2.190.0040.01518.27
8.2.180.0140.00316.63
8.2.170.0040.01122.96
8.2.160.0070.00720.38
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0080.00018.09
8.2.120.0040.00426.35
8.2.110.0060.00319.06
8.2.100.0130.00018.16
8.2.90.0000.00819.21
8.2.80.0080.00017.97
8.2.70.0080.00817.50
8.2.60.0040.00417.93
8.2.50.0040.00418.10
8.2.40.0080.00022.32
8.2.30.0050.00219.35
8.2.20.0040.00417.67
8.2.10.0030.00518.14
8.2.00.0000.00718.16
8.1.310.0060.00316.92
8.1.300.0000.00818.53
8.1.290.0030.00630.84
8.1.280.0090.00625.92
8.1.270.0050.00323.88
8.1.260.0140.00428.09
8.1.250.0040.00428.09
8.1.240.0030.00621.30
8.1.230.0070.00417.42
8.1.220.0030.00517.77
8.1.210.0000.00918.77
8.1.200.0060.00517.35
8.1.190.0030.00517.23
8.1.180.0000.00818.10
8.1.170.0040.00418.59
8.1.160.0030.00318.84
8.1.150.0000.00718.75
8.1.140.0050.00319.45
8.1.130.0030.00317.71
8.1.120.0040.00417.33
8.1.110.0030.00617.39
8.1.100.0000.00717.46
8.1.90.0080.00017.38
8.1.80.0040.00417.46
8.1.70.0050.00317.36
8.1.60.0080.00017.63
8.1.50.0040.00417.44
8.1.40.0000.00817.58
8.1.30.0040.00417.50
8.1.20.0030.00517.69
8.1.10.0040.00417.63
8.1.00.0000.00817.54
8.0.300.0040.00418.77
8.0.290.0070.00016.63
8.0.280.0000.00718.39
8.0.270.0000.00816.75
8.0.260.0030.00317.16
8.0.250.0070.00016.87
8.0.240.0000.00816.82
8.0.230.0020.00516.88
8.0.220.0030.00316.75
8.0.210.0030.00516.71
8.0.200.0060.00316.78
8.0.190.0000.00716.87
8.0.180.0060.00316.86
8.0.170.0000.00816.79
8.0.160.0030.00516.89
8.0.150.0000.00716.73
8.0.140.0070.00416.86
8.0.130.0000.00613.23
8.0.120.0050.00316.84
8.0.110.0080.00016.70
8.0.100.0040.00416.90
8.0.90.0000.00716.71
8.0.80.0060.01516.86
8.0.70.0040.00416.88
8.0.60.0050.00216.75
8.0.50.0040.00416.73
8.0.30.0130.00717.05
8.0.20.0090.01017.40
8.0.10.0040.00417.07
8.0.00.0090.00916.90
7.4.330.0050.00015.08
7.4.320.0000.00616.59
7.4.300.0030.00316.50
7.4.290.0030.00316.61
7.4.280.0040.00416.50
7.4.270.0000.00716.54
7.4.260.0070.00016.36
7.4.250.0000.00716.59
7.4.240.0070.00016.43
7.4.230.0070.00016.61
7.4.220.0030.01516.55
7.4.210.0070.00716.62
7.4.200.0070.00016.66
7.4.160.0090.00616.50
7.4.150.0110.00817.40
7.4.140.0090.00817.86
7.4.130.0120.01016.41
7.4.120.0080.00916.53
7.4.110.0130.01316.49
7.4.100.0160.00616.63
7.4.90.0090.00916.64
7.4.80.0000.02019.39
7.4.70.0040.01616.48
7.4.60.0060.00916.41
7.4.50.0030.01016.68
7.4.40.0030.01316.43
7.4.30.0140.00616.50
7.4.10.0050.01014.79
7.4.00.0090.00814.89
7.3.330.0000.00713.03
7.3.320.0030.00313.25
7.3.310.0000.00716.22
7.3.300.0080.00016.18
7.3.290.0070.00016.25
7.3.280.0070.01316.31
7.3.270.0030.01317.40
7.3.260.0040.01316.47
7.3.250.0110.00816.44
7.3.240.0050.01216.27
7.3.230.0100.00616.39
7.3.210.0080.00816.29
7.3.200.0120.00416.50
7.3.190.0080.01116.34
7.3.180.0100.00616.67
7.3.170.0060.01216.29
7.3.160.0140.00316.21
7.3.130.0110.00514.81
7.3.120.0100.00714.59
7.3.110.0090.01014.70
7.3.100.0070.01014.76
7.3.90.0050.01114.92
7.3.80.0060.00714.87
7.3.70.0090.00414.74
7.3.60.0040.00814.59
7.3.50.0070.00714.76
7.3.40.0070.00714.67
7.3.30.0060.00314.78
7.3.20.0090.00516.58
7.3.10.0110.00316.43
7.3.00.0050.00616.70
7.2.330.0060.01216.52
7.2.320.0070.01816.34
7.2.310.0060.01616.29
7.2.300.0090.00916.75
7.2.290.0110.00516.70
7.2.260.0100.00814.99
7.2.250.0140.00315.17
7.2.240.0050.00915.07
7.2.230.0060.00915.00
7.2.220.0090.00915.13
7.2.210.0020.01114.68
7.2.200.0050.00715.01
7.2.190.0040.01014.92
7.2.180.0050.00715.11
7.2.170.0050.00914.99
7.2.160.0080.00815.10
7.2.150.0080.00716.81
7.2.140.0030.00916.88
7.2.130.0050.01016.91
7.2.120.0050.00816.95
7.2.110.0020.01216.87
7.2.100.0050.01017.06
7.2.90.0070.00716.97
7.2.80.0050.00816.89
7.2.70.0030.00917.06
7.2.60.0040.00916.90
7.2.50.0060.00616.89
7.2.40.0040.01016.79
7.2.30.0040.01016.74
7.2.20.0050.00816.81
7.2.10.0070.00816.95
7.2.00.0030.00817.73
7.1.330.0100.00315.55
7.1.320.0090.00815.74
7.1.310.0040.00915.81
7.1.300.0040.00515.78
7.1.290.0030.00715.75
7.1.280.0030.01215.69
7.1.270.0020.00815.64
7.1.260.0080.00515.85
7.1.250.0070.00715.71
7.1.240.0100.00215.81
7.1.230.0020.00815.79
7.1.220.0020.01415.77
7.1.210.0050.00415.65
7.1.200.0050.00815.73
7.1.190.0080.00615.76
7.1.180.0030.01015.74
7.1.170.0020.01015.73
7.1.160.0030.00915.80
7.1.150.0050.00415.78
7.1.140.0080.00815.80
7.1.130.0060.00815.79
7.1.120.0070.00715.82
7.1.110.0070.00315.77
7.1.100.0060.00616.44
7.1.90.0070.00715.84
7.1.80.0050.00415.85
7.1.70.0070.00416.05
7.1.60.0030.01116.98
7.1.50.0070.00415.70
7.1.40.0030.00715.80
7.1.30.0030.01015.87
7.1.20.0040.00715.67
7.1.10.0070.00715.73
7.1.00.0050.02718.06
7.0.330.0050.00815.15
7.0.320.0030.00915.32
7.0.310.0050.00815.46
7.0.300.0030.00615.36
7.0.290.0080.00515.35
7.0.280.0030.00915.20
7.0.270.0040.01015.22
7.0.260.0050.00715.35
7.0.250.0050.00715.34
7.0.240.0070.00615.44
7.0.230.0060.00615.51
7.0.220.0030.00515.40
7.0.210.0050.00815.27
7.0.200.0060.00815.08
7.0.190.0100.00315.51
7.0.180.0060.00315.47
7.0.170.0030.00715.14
7.0.160.0030.00815.37
7.0.150.0060.00615.38
7.0.140.0070.00715.24
7.0.130.0120.00015.42
7.0.120.0040.00715.45
7.0.110.0050.00515.39
7.0.100.0190.02516.79
7.0.90.0010.03716.86
7.0.80.0050.02716.85
7.0.70.0090.02016.95
7.0.60.0080.02116.93
7.0.50.0020.02217.06
7.0.40.0040.01815.61
7.0.30.0020.02415.56
7.0.20.0070.01815.69
7.0.10.0070.01915.57
7.0.00.0050.02315.53
5.6.400.0020.01414.52
5.6.390.0070.00714.58
5.6.380.0080.00513.98
5.6.370.0080.00814.25
5.6.360.0040.00814.61
5.6.350.0090.00514.32
5.6.340.0030.01114.41
5.6.330.0070.00614.35
5.6.320.0080.00614.47
5.6.310.0010.00914.51
5.6.300.0060.00614.36
5.6.290.0070.00214.52
5.6.280.0090.02716.72
5.6.270.0020.01014.26
5.6.260.0060.00414.43
5.6.250.0070.03116.54
5.6.240.0110.03116.48
5.6.230.0040.03416.53
5.6.220.0100.01616.34
5.6.210.0060.02016.53
5.6.200.0060.01816.67
5.6.190.0090.01516.59
5.6.180.0060.01916.57
5.6.170.0070.02716.64
5.6.160.0070.01716.49
5.6.150.0050.02216.70
5.6.140.0090.02516.67
5.6.130.0060.01716.53
5.6.120.0080.01516.68
5.6.110.0050.02316.64
5.6.100.0040.01916.61
5.6.90.0070.03416.67
5.6.80.0020.02016.43
5.6.70.0040.01816.27
5.6.60.0030.02016.30
5.6.50.0050.01916.27
5.6.40.0030.02316.45
5.6.30.0050.01716.29
5.6.20.0090.02616.20
5.6.10.0080.01816.31
5.6.00.0080.01316.33
5.5.380.0080.02916.41
5.5.370.0080.03216.45
5.5.360.0010.03516.21
5.5.350.0040.02216.48
5.5.340.0020.02416.46
5.5.330.0050.01816.55
5.5.320.0020.02316.52
5.5.310.0090.02216.52
5.5.300.0020.02016.40
5.5.290.0100.02716.54
5.5.280.0050.02016.45
5.5.270.0070.01616.35
5.5.260.0040.02116.65
5.5.250.0070.01516.49
5.5.240.0040.01816.29
5.5.230.0100.01316.14
5.5.220.0030.01816.27
5.5.210.0070.01616.25
5.5.200.0030.02016.19
5.5.190.0050.01916.32
5.5.180.0070.01716.22
5.5.170.0040.01014.09
5.5.160.0070.01516.31
5.5.150.0070.01716.28
5.5.140.0020.02116.18
5.5.130.0050.01716.21
5.5.120.0100.02816.25
5.5.110.0030.03316.23
5.5.100.0040.03116.24
5.5.90.0080.02416.19
5.5.80.0050.02816.08
5.5.70.0070.01816.06
5.5.60.0080.02916.29
5.5.50.0050.02816.29
5.5.40.0080.02616.24
5.5.30.0030.03316.21
5.5.20.0060.01916.26
5.5.10.0080.02416.02
5.5.00.0040.03016.11
5.4.450.0130.02719.36
5.4.440.0070.04019.22
5.4.430.0030.04019.30
5.4.420.0000.04319.11
5.4.410.0130.03319.02
5.4.400.0030.03718.90
5.4.390.0100.03019.12
5.4.380.0070.03719.23
5.4.370.0000.04019.14
5.4.360.0000.04318.92
5.4.350.0000.04019.10
5.4.340.0030.04019.03
5.4.320.0100.03319.04
5.4.310.0000.04019.04
5.4.300.0030.04018.97
5.4.290.0000.04018.81
5.4.280.0000.04019.11
5.4.270.0100.04319.05
5.4.260.0070.06319.03
5.4.250.0070.04018.78
5.4.240.0070.07319.02
5.4.230.0070.04319.09
5.4.220.0030.05019.04
5.4.210.0130.06018.96
5.4.200.0030.07719.02
5.4.190.0030.07319.08
5.4.180.0170.06718.78
5.4.170.0130.05718.97
5.4.160.0100.07319.13
5.4.150.0070.07018.93
5.4.140.0000.08016.28
5.4.130.0070.03716.29
5.4.120.0030.07016.27
5.4.110.0100.06016.33
5.4.100.0070.06016.44
5.4.90.0030.07016.28
5.4.80.0070.05016.39
5.4.70.0070.05316.29
5.4.60.0030.07716.21
5.4.50.0070.07716.34
5.4.40.0070.07016.37
5.4.30.0000.05016.39
5.4.20.0070.05716.36
5.4.10.0030.04316.38
5.4.00.0070.06015.73
5.3.290.0070.03014.51
5.3.280.0130.07314.47
5.3.270.0030.03314.46
5.3.260.0100.07314.43
5.3.250.0070.06714.47
5.3.240.0000.08714.58
5.3.230.0030.07014.59
5.3.220.0070.04314.43
5.3.210.0130.07314.55
5.3.200.0030.07314.54
5.3.190.0070.07714.43
5.3.180.0170.06314.42
5.3.170.0130.02714.54
5.3.160.0100.03714.43
5.3.150.0070.06714.52
5.3.140.0030.04314.52
5.3.130.0030.07314.41
5.3.120.0100.05014.41
5.3.110.0000.04014.38
5.3.100.0000.05314.04
5.3.90.0030.08013.96
5.3.80.0000.08314.01
5.3.70.0030.07314.01
5.3.60.0070.07313.99
5.3.50.0100.06313.85
5.3.40.0100.07013.93
5.3.30.0100.07013.69
5.3.20.0030.06013.65
5.3.10.0030.07313.62
5.3.00.0000.08013.61
5.2.170.0030.04011.14
5.2.160.0000.04710.99
5.2.150.0100.05011.21
5.2.140.0030.05311.13
5.2.130.0030.05711.17
5.2.120.0100.05710.95
5.2.110.0100.05011.16
5.2.100.0030.03310.94
5.2.90.0030.06010.92
5.2.80.0070.03011.16
5.2.70.0000.06711.02
5.2.60.0070.05711.09
5.2.50.0030.05310.96
5.2.40.0130.04310.99
5.2.30.0070.03010.82
5.2.20.0070.03710.82
5.2.10.0030.06310.91
5.2.00.0000.03710.64
5.1.60.0030.05010.04
5.1.50.0030.0509.98
5.1.40.0070.05310.02
5.1.30.0100.05310.25
5.1.20.0070.05010.40
5.1.10.0070.05010.15
5.1.00.0070.06010.09
5.0.50.0030.0438.35
5.0.40.0030.0438.39
5.0.30.0070.0678.24
5.0.20.0070.0208.12
5.0.10.0030.0478.12
5.0.00.0030.0638.22
4.4.90.0030.0238.12
4.4.80.0100.0278.12
4.4.70.0000.0178.12
4.4.60.0070.0238.12
4.4.50.0000.0238.12
4.4.40.0070.0408.12
4.4.30.0030.0278.12
4.4.20.0030.0138.12
4.4.10.0030.0338.12
4.4.00.0030.0508.12
4.3.110.0100.0278.12
4.3.100.0130.0278.12
4.3.90.0070.0308.12
4.3.80.0000.0538.12
4.3.70.0100.0238.12
4.3.60.0030.0178.12
4.3.50.0030.0238.12
4.3.40.0000.0308.12
4.3.30.0030.0308.12
4.3.20.0000.0238.12
4.3.10.0000.0378.12
4.3.00.0070.0208.12

preferences:
36.03 ms | 403 KiB | 5 Q