3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PilotId { protected $pid; /** * @param PilotId|string $pid */ public function __construct($pid){ if(!preg_match("^(AFA|PAY)([0-9]{4})$", (string)$pid)) throw new \InvalidArgumentException('Invalid PID'); $this->pid = $pid; } function __toString(){ return $this->pid; } }

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.0070.01016.38
8.3.50.0090.00922.05
8.3.40.0140.00018.59
8.3.30.0000.01418.50
8.3.20.0080.00820.20
8.3.10.0060.00323.42
8.3.00.0040.00419.07
8.2.180.0030.01716.60
8.2.170.0040.01122.96
8.2.160.0100.00322.31
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0030.00719.12
8.2.120.0000.00726.35
8.2.110.0030.00721.06
8.2.100.0040.00717.66
8.2.90.0050.00317.84
8.2.80.0000.00817.97
8.2.70.0030.00917.38
8.2.60.0060.00617.91
8.2.50.0000.00818.07
8.2.40.0070.00019.34
8.2.30.0000.00720.62
8.2.20.0000.00817.62
8.2.10.0040.00417.96
8.2.00.0040.00418.04
8.1.280.0160.00025.92
8.1.270.0090.00022.16
8.1.260.0030.00628.09
8.1.250.0140.00028.09
8.1.240.0060.00322.39
8.1.230.0080.00420.96
8.1.220.0000.00917.74
8.1.210.0050.00318.89
8.1.200.0080.00317.23
8.1.190.0080.00017.22
8.1.180.0080.00018.10
8.1.170.0020.00520.06
8.1.160.0040.00421.95
8.1.150.0040.00418.82
8.1.140.0060.00319.51
8.1.130.0030.00317.65
8.1.120.0040.00417.36
8.1.110.0030.00317.40
8.1.100.0040.00417.36
8.1.90.0000.00717.39
8.1.80.0050.00317.36
8.1.70.0030.00317.36
8.1.60.0050.00317.53
8.1.50.0000.00817.35
8.1.40.0000.01017.48
8.1.30.0030.00517.55
8.1.20.0040.00417.46
8.1.10.0030.00617.45
8.1.00.0000.00817.24
8.0.300.0040.00419.94
8.0.290.0000.00716.75
8.0.280.0040.00418.34
8.0.270.0030.00317.19
8.0.260.0040.00417.13
8.0.250.0000.00716.88
8.0.240.0080.00016.73
8.0.230.0030.00316.77
8.0.220.0000.00716.84
8.0.210.0040.00416.86
8.0.200.0040.00416.93
8.0.190.0000.00816.93
8.0.180.0040.00416.74
8.0.170.0030.00616.84
8.0.160.0050.00316.76
8.0.150.0020.00516.76
8.0.140.0080.00416.80
8.0.130.0030.00313.26
8.0.120.0000.00816.65
8.0.110.0040.00416.79
8.0.100.0000.00716.74
8.0.90.0080.00016.65
8.0.80.0150.00616.81
8.0.70.0000.00716.65
8.0.60.0000.00716.72
8.0.50.0000.00716.69
8.0.30.0130.00816.98
8.0.20.0100.00917.40
8.0.10.0000.00716.90
8.0.00.0090.00816.90
7.4.330.0000.00516.67
7.4.320.0000.00616.37
7.4.300.0060.00016.47
7.4.290.0000.00716.51
7.4.280.0060.00316.48
7.4.270.0070.00016.48
7.4.260.0030.00316.48
7.4.250.0050.00316.29
7.4.240.0020.00516.35
7.4.230.0030.00316.54
7.4.220.0120.01216.59
7.4.210.0040.01016.58
7.4.200.0030.00316.41
7.4.160.0140.00016.29
7.4.150.0160.00317.40
7.4.140.0090.01117.86
7.4.130.0090.00716.22
7.4.120.0080.01116.28
7.4.110.0100.00716.43
7.4.100.0080.00816.19
7.4.90.0120.00616.29
7.4.80.0070.01419.39
7.4.70.0030.01716.40
7.4.60.0060.00916.43
7.4.50.0070.01016.29
7.4.40.0070.00916.16
7.4.30.0090.01316.35
7.4.00.0070.00714.62
7.3.330.0020.00313.11
7.3.320.0000.00613.04
7.3.310.0030.00316.07
7.3.300.0000.00716.04
7.3.290.0060.01016.19
7.3.280.0040.01416.18
7.3.270.0060.01017.40
7.3.260.0110.00816.20
7.3.250.0080.01216.30
7.3.240.0130.00516.18
7.3.230.0070.01016.45
7.3.210.0090.00616.53
7.3.200.0040.01316.22
7.3.190.0120.00416.19
7.3.180.0170.00016.30
7.3.170.0080.00816.47
7.3.160.0070.00716.13
7.3.10.0060.01016.48
7.3.00.0090.00616.74
7.2.330.0100.00716.66
7.2.320.0090.00916.47
7.2.310.0130.00916.38
7.2.300.0070.01016.56
7.2.290.0070.01116.57
7.2.130.0030.01316.87
7.2.120.0000.01816.84
7.2.110.0000.01416.46
7.2.100.0030.00616.66
7.2.90.0040.01217.00
7.2.80.0120.00316.41
7.2.70.0030.00716.86
7.2.60.0040.01116.70
7.2.50.0100.00616.83
7.2.40.0000.01816.62
7.2.30.0070.01116.80
7.2.20.0060.00616.86
7.2.10.0070.01016.44
7.2.00.0090.00817.84
7.1.250.0030.01315.60
7.1.100.0040.00417.96
7.1.70.0000.00916.64
7.1.60.0120.01219.48
7.1.50.0040.01316.76
7.1.00.0070.07322.37
7.0.200.0400.00314.68
7.0.60.0130.07019.95
7.0.50.0070.04017.87
7.0.40.0030.08020.18
7.0.30.0100.04320.13
7.0.20.0270.06720.05
7.0.10.0030.06720.24
7.0.00.0070.05320.29
5.6.280.0030.07021.03
5.6.210.0070.05720.57
5.6.200.0100.08018.16
5.6.190.0100.08720.62
5.6.180.0370.08020.45
5.6.170.0400.07020.48
5.6.160.0000.06020.54
5.6.150.0130.07318.16
5.6.140.0070.03718.27
5.6.130.0100.07318.24
5.6.120.0100.08721.13
5.6.110.0030.04021.11
5.6.100.0030.04321.09
5.6.90.0100.06721.09
5.6.80.0070.03720.54
5.5.350.4100.04720.44
5.5.340.0100.04717.96
5.5.330.0100.08020.41
5.5.320.0270.05020.28
5.5.310.0430.07320.30
5.5.300.0100.08018.09
5.5.290.0170.07317.95
5.5.280.0000.07320.85
5.5.270.0100.07320.84
5.5.260.0070.08020.65
5.5.250.0100.06320.59
5.5.240.0100.04320.16

preferences:
65.19 ms | 401 KiB | 5 Q