3v4l.org

run code in 300+ PHP versions simultaneously
<?php const STATUS_SUCCESS = 'success'; const STATUS_FAILED = 'failed'; const STATUS_PENDING = 'pending'; const STATUS_CHARGEBACK = 'chargeback'; const STATUS_CANCELED = 'canceled'; $status = 'canceled'; switch ($status) { case STATUS_FAILED: case STATUS_CANCELED: case STATUS_CHARGEBACK: var_dump('asdfasdf'); break; case STATUS_PENDING: case STATUS_CANCELED: case STATUS_SUCCESS: var_dump('dsfgdf'); break; default: throw new \InvalidArgumentException(sprintf("Unknown transaction response status: '%s'", $status)); break; }

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.0110.00418.24
8.3.50.0080.01021.15
8.3.40.0110.00318.77
8.3.30.0110.00418.77
8.3.20.0090.00620.22
8.3.10.0000.00823.66
8.3.00.0050.00319.43
8.2.180.0150.00616.38
8.2.170.0090.00622.96
8.2.160.0060.00920.52
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0070.00726.16
8.2.120.0000.00917.47
8.2.110.0040.00422.26
8.2.100.0040.00817.75
8.2.90.0030.00618.99
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0000.00917.80
8.2.50.0080.00018.07
8.2.40.0000.00919.47
8.2.30.0030.00619.90
8.2.20.0040.00417.70
8.2.10.0030.00617.93
8.2.00.0070.00018.12
8.1.280.0040.01225.92
8.1.270.0110.00720.29
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00022.70
8.1.230.0080.00317.42
8.1.220.0040.00417.77
8.1.210.0000.00918.77
8.1.200.0090.00017.11
8.1.190.0000.01017.00
8.1.180.0000.00918.10
8.1.170.0040.00418.62
8.1.160.0000.00722.03
8.1.150.0040.00418.88
8.1.140.0000.00817.40
8.1.130.0050.00217.64
8.1.120.0000.00717.48
8.1.110.0020.00517.55
8.1.100.0000.00717.36
8.1.90.0040.00417.36
8.1.80.0040.00417.45
8.1.70.0030.00317.34
8.1.60.0040.00417.65
8.1.50.0050.00217.57
8.1.40.0050.00317.45
8.1.30.0030.00617.57
8.1.20.0040.00417.59
8.1.10.0000.00717.36
8.1.00.0040.00417.27
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0070.00018.44
8.0.270.0000.00717.21
8.0.260.0030.00517.18
8.0.250.0040.00416.85
8.0.240.0000.00716.93
8.0.230.0000.00717.00
8.0.220.0000.00616.86
8.0.210.0040.00416.88
8.0.200.0000.00716.93
8.0.190.0030.00516.92
8.0.180.0000.00816.95
8.0.170.0000.00816.81
8.0.160.0070.00016.80
8.0.150.0000.00716.87
8.0.140.0040.00416.74
8.0.130.0060.00013.25
8.0.120.0040.00416.87
8.0.110.0050.00216.76
8.0.100.0080.00017.00
8.0.90.0000.00816.88
8.0.80.0090.00616.84
8.0.70.0000.00916.93
8.0.60.0000.00716.89
8.0.50.0000.00716.87
8.0.30.0090.01017.22
8.0.20.0150.00317.40
8.0.10.0030.00516.97
8.0.00.0070.01416.70
7.4.330.0050.00015.08
7.4.320.0030.00316.55
7.4.300.0000.00616.62
7.4.290.0000.00716.66
7.4.280.0080.00016.61
7.4.270.0030.00316.67
7.4.260.0000.00816.40
7.4.250.0030.00316.58
7.4.240.0060.00216.51
7.4.230.0030.00316.51
7.4.220.0160.00316.60
7.4.210.0110.00316.46
7.4.200.0000.00716.63
7.4.160.0040.01216.53
7.4.150.0070.01117.40
7.4.140.0160.00217.86
7.4.130.0090.01216.55
7.4.120.0100.00816.44
7.4.110.0070.01116.64
7.4.100.0040.01616.57
7.4.90.0030.01316.66
7.4.80.0100.00719.39
7.4.70.0160.00616.74
7.4.60.0080.00916.52
7.4.50.0050.00316.34
7.4.40.0120.00316.55
7.4.30.0080.00816.45
7.4.00.0070.00915.09
7.3.330.0020.00213.15
7.3.320.0000.00613.04
7.3.310.0050.00316.10
7.3.300.0040.00416.32
7.3.290.0030.01116.27
7.3.280.0100.01016.22
7.3.270.0090.00917.40
7.3.260.0070.01016.56
7.3.240.0120.00416.36
7.3.230.0160.00316.46
7.3.210.0110.00616.39
7.3.200.0090.00916.49
7.3.190.0040.01516.55
7.3.180.0130.00516.22
7.3.170.0060.00916.39
7.3.160.0080.01216.20
7.3.120.0120.00614.74
7.3.110.0110.00414.93
7.3.100.0090.00615.03
7.3.90.0060.01114.61
7.3.80.0100.00315.13
7.3.70.0070.00714.91
7.3.60.0070.00714.61
7.3.50.0000.01114.64
7.3.40.0060.00614.54
7.3.30.0060.00914.87
7.3.20.0070.00716.73
7.3.10.0100.00316.50
7.3.00.0090.00616.57
7.2.330.0140.00316.70
7.2.320.0090.00916.66
7.2.310.0100.00616.66
7.2.300.0080.01116.54
7.2.290.0030.01716.61
7.2.250.0070.01015.23
7.2.240.0060.01214.86
7.2.230.0080.00414.96
7.2.220.0030.01014.67
7.2.210.0090.00414.81
7.2.200.0070.00715.04
7.2.190.0100.00314.71
7.2.180.0030.00715.05
7.2.170.0110.00414.81
7.2.00.0090.00619.35
7.1.330.0060.00915.68
7.1.320.0030.00615.66
7.1.310.0030.01015.44
7.1.300.0070.00315.45
7.1.290.0080.00415.85
7.1.280.0080.00615.86
7.1.270.0060.00915.75
7.1.260.0060.01015.79
7.1.100.0040.01118.12
7.1.70.0000.00817.12
7.1.60.0070.00419.12
7.1.50.0060.00916.90
7.1.00.0000.08022.30
7.0.200.0080.00316.55
7.0.60.0070.04320.06
7.0.50.0100.06317.82
7.0.40.0300.06320.21
7.0.30.0430.07720.21
7.0.20.0230.05720.20
7.0.10.0070.04320.08
7.0.00.0100.06320.33
5.6.280.0000.05720.99
5.6.210.0030.06020.50
5.6.200.0070.07318.19
5.6.190.0070.04320.27
5.6.180.0300.06320.42
5.6.170.0230.06020.61
5.6.160.0030.08720.41
5.6.150.0130.05718.18
5.6.140.0030.04318.20
5.6.130.0030.07018.10
5.6.120.0130.07720.96
5.6.110.0100.08321.11
5.6.100.0100.04720.98
5.6.90.0030.04320.97
5.6.80.0030.08320.35
5.6.70.0170.06720.36
5.5.350.3400.04320.48
5.5.340.0030.07718.02
5.5.330.0070.08320.37
5.5.320.0300.07320.26
5.5.310.0330.07720.20
5.5.300.0030.04017.91
5.5.290.0000.05017.92
5.5.280.0030.08320.77
5.5.270.0030.08320.89
5.5.260.0200.07020.79
5.5.250.0030.06720.69
5.5.240.0200.06320.26
5.4.450.0970.05719.55
5.4.440.0800.06319.57
5.4.430.0700.06019.39
5.4.420.0800.05019.53
5.4.410.0900.04319.19
5.4.400.0770.05719.30
5.4.390.0670.05319.31
5.4.380.0900.05319.00
5.4.370.0670.04719.15
5.4.360.0870.05319.14
5.4.350.0600.05319.25
5.4.340.0770.05719.26
5.4.320.0730.06019.15
5.4.310.0900.05319.21
5.4.300.0870.04719.28
5.4.290.0800.04719.18
5.4.280.0830.06018.80
5.4.270.0830.07019.30
5.4.260.0570.06019.16
5.4.250.1030.05018.94
5.4.240.0770.06719.13
5.4.230.0700.06018.98
5.4.220.0800.05719.30
5.4.210.0900.04019.16
5.4.200.0870.07319.16
5.4.190.0870.07019.29
5.4.180.0630.05019.15
5.4.170.0570.05319.13
5.4.160.0600.05719.14
5.4.150.0630.05019.05
5.4.140.1030.06016.42
5.4.130.0700.05716.29
5.4.120.0970.06716.42
5.4.110.0970.05316.41
5.4.100.0630.05016.54
5.4.90.0600.05016.59
5.4.80.0500.05716.58
5.4.70.0230.03016.51
5.4.60.0370.06016.37
5.4.50.0030.06716.36
5.4.40.0070.05716.40
5.4.30.0000.03316.36
5.4.20.0030.07316.24

preferences:
47.49 ms | 401 KiB | 5 Q