3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class ATM { private $trials = 3; private $balance = 100; private $password; private $login; private $pin; public function checkBalance(int $pin, string $password, string $login) { echo '<h1>Witam w banku DSC SA.</h1>'; $this->getPassword(); echo '<p>Prosze wprowadzic login: </p>'; $this->getLogin(); echo '<p>Prosze wprowadzic haslo: </p>'; $this->getPassword(); echo '<p>Prosze wprowadzic PIN: </p>'; $this->getPin(); if ($pin == $this->getPin() && $password == $this->getPassword() && $login == $this->getLogin() ) { echo "Poprawne dane" . PHP_EOL; echo "Saldo konta wynosi: {$this->balance}"; } else { $this->trials--; echo "Niepoprawne dane" . PHP_EOL; echo "Pozostalo {$this->trials} proby"; } } public function getBalance() { return $this->balance = 100; } public function getTrials() { return $this->trials; } private function getLogin() { return $this->login = 'admin'; } private function getPassword() { return $this->password = 'secret'; } private function getPin() { return $this->pin = 1234; } } $banco = new ATM(); $banco->checkBalance(1234, 'secret', 'admin');

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.0120.00918.20
8.3.50.0070.01222.03
8.3.40.0160.00618.77
8.3.30.0170.00318.71
8.3.20.0040.01420.29
8.3.10.0080.00020.36
8.3.00.0090.00921.61
8.2.180.0080.00816.75
8.2.170.0100.00722.96
8.2.160.0090.00622.14
8.2.150.0070.01124.18
8.2.140.0040.00424.66
8.2.130.0070.00320.63
8.2.120.0140.00326.35
8.2.110.0070.00322.16
8.2.100.0090.00317.93
8.2.90.0040.00419.22
8.2.80.0060.00317.97
8.2.70.0070.00317.50
8.2.60.0000.00817.93
8.2.50.0000.00818.09
8.2.40.0040.00422.00
8.2.30.0000.00719.46
8.2.20.0030.00517.63
8.2.10.0040.00418.13
8.2.00.0000.00818.01
8.1.280.0180.00425.92
8.1.270.0190.00022.16
8.1.260.0060.01228.09
8.1.250.0080.00028.09
8.1.240.0070.01422.39
8.1.230.0080.00417.70
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0050.00517.50
8.1.190.0000.00817.10
8.1.180.0000.00818.10
8.1.170.0070.00418.39
8.1.160.0040.00420.81
8.1.150.0040.00418.82
8.1.140.0040.00419.46
8.1.130.0050.00217.63
8.1.120.0000.00817.52
8.1.110.0000.00717.35
8.1.100.0020.00517.40
8.1.90.0050.00317.47
8.1.80.0040.00417.45
8.1.70.0030.00317.51
8.1.60.0040.00417.55
8.1.50.0000.00817.46
8.1.40.0000.00817.53
8.1.30.0040.00417.69
8.1.20.0050.00317.47
8.1.10.0000.00717.61
8.1.00.0110.00017.37
8.0.300.0050.00318.77
8.0.290.0000.01016.75
8.0.280.0000.00718.45
8.0.270.0000.00717.24
8.0.260.0050.00317.29
8.0.250.0030.00317.02
8.0.240.0060.00016.88
8.0.230.0040.00416.96
8.0.220.0070.00016.89
8.0.210.0040.00416.89
8.0.200.0000.00717.03
8.0.190.0030.00516.95
8.0.180.0040.00416.89
8.0.170.0030.00616.90
8.0.160.0070.00016.89
8.0.150.0000.00716.98
8.0.140.0040.00416.87
8.0.130.0060.00013.33
8.0.120.0040.00416.73
8.0.110.0040.00416.96
8.0.100.0020.00516.78
8.0.90.0040.00416.89
8.0.80.0000.01416.87
8.0.70.0050.00216.95
8.0.60.0050.00216.86
8.0.50.0040.00416.77
8.0.30.0140.00617.03
8.0.20.0100.00917.40
8.0.10.0070.00016.83
8.0.00.0130.00716.77
7.4.330.0000.00516.85
7.4.320.0000.00616.61
7.4.300.0070.00016.61
7.4.290.0030.00716.46
7.4.280.0030.00316.44
7.4.270.0070.00016.50
7.4.260.0040.00416.52
7.4.250.0000.00716.48
7.4.240.0000.00716.42
7.4.230.0070.00016.51
7.4.220.0030.01516.71
7.4.210.0070.00716.49
7.4.200.0070.00016.68
7.4.160.0130.00716.44
7.4.150.0140.00317.40
7.4.140.0070.01317.86
7.4.130.0080.01416.42
7.4.120.0050.01216.58
7.4.110.0110.00616.54
7.4.100.0120.00816.54
7.4.90.0060.01216.52
7.4.80.0070.01419.39
7.4.70.0000.01616.40
7.4.60.0100.00716.41
7.4.50.0060.00616.61
7.4.40.0110.00816.38
7.4.30.0080.00816.50
7.4.10.0090.00615.15
7.4.00.0080.00914.91
7.3.330.0030.00413.27
7.3.320.0030.00313.13
7.3.310.0030.00316.34
7.3.300.0070.00016.18
7.3.290.0070.00016.35
7.3.280.0120.00616.31
7.3.270.0070.01117.40
7.3.260.0090.00916.48
7.3.250.0080.00916.44
7.3.240.0060.01416.48
7.3.230.0090.00916.39
7.3.210.0130.01016.45
7.3.200.0140.00316.59
7.3.190.0030.01316.26
7.3.180.0130.00316.48
7.3.170.0060.01016.23
7.3.160.0030.01416.42
7.3.130.0030.01514.53
7.3.120.0140.00515.01
7.3.110.0030.01514.77
7.3.100.0080.00815.04
7.3.90.0030.00914.84
7.3.80.0030.01214.87
7.3.70.0060.00614.81
7.3.60.0060.00914.71
7.3.50.0070.00814.86
7.3.40.0020.00914.90
7.3.30.0050.00914.80
7.3.20.0070.00716.70
7.3.10.0040.01116.51
7.3.00.0070.00516.61
7.2.330.0150.00316.63
7.2.320.0070.01016.80
7.2.310.0100.00616.61
7.2.300.0100.00616.82
7.2.290.0070.00716.86
7.2.260.0030.01315.31
7.2.250.0060.01315.12
7.2.240.0110.00715.21
7.2.230.0090.00614.93
7.2.220.0070.00915.05
7.2.210.0070.00715.08
7.2.200.0060.00615.07
7.2.190.0040.01115.11
7.2.180.0110.00415.13
7.2.170.0070.00714.93
7.2.160.0090.00615.21
7.2.150.0030.01316.97
7.2.140.0030.00616.94
7.2.130.0110.00717.03
7.2.120.0070.00716.87
7.2.110.0030.01016.82
7.2.100.0100.00016.82
7.2.90.0070.01117.07
7.2.80.0100.01016.96
7.2.70.0070.00717.03
7.2.60.0080.00616.98
7.2.50.0030.01217.02
7.2.40.0070.00716.85
7.2.30.0060.00916.77
7.2.20.0070.00317.12
7.2.10.0080.00416.88
7.2.00.0090.00518.31
7.1.330.0040.00715.74
7.1.320.0030.01015.66
7.1.310.0050.01015.67
7.1.300.0050.00715.43
7.1.290.0030.01015.59
7.1.280.0050.00915.65
7.1.270.0060.00615.63
7.1.260.0120.00215.64
7.1.250.0080.00415.75
7.1.240.0000.01715.59
7.1.230.0090.00315.49
7.1.220.0000.01115.68
7.1.210.0090.00915.61
7.1.200.0060.01015.71
7.1.190.0040.01115.84
7.1.180.0060.00315.36
7.1.170.0030.00915.67
7.1.160.0070.00715.55
7.1.150.0150.00015.45
7.1.140.0040.01115.54
7.1.130.0080.00415.55
7.1.120.0030.01215.64
7.1.110.0000.01515.87
7.1.100.0050.00916.87
7.1.90.0090.00615.42
7.1.80.0070.00715.55
7.1.70.0070.00416.41
7.1.60.0100.00817.49
7.1.50.0050.01316.36
7.1.40.0030.01015.66
7.1.30.0030.00715.70
7.1.20.0070.00715.63
7.1.10.0030.01015.80
7.1.00.0080.03818.81
7.0.330.0060.00615.41
7.0.320.0100.00315.60
7.0.310.0070.00715.34
7.0.300.0030.01015.45
7.0.290.0060.00615.22
7.0.280.0070.00415.42
7.0.270.0060.00615.11
7.0.260.0040.01115.21
7.0.250.0000.01515.53
7.0.240.0030.00915.45
7.0.230.0050.01015.53
7.0.220.0140.00315.32
7.0.210.0030.01315.45
7.0.200.0180.01115.29
7.0.190.0090.00615.21
7.0.180.0000.01215.54
7.0.170.0120.00315.33
7.0.160.0130.00715.22
7.0.150.0100.00715.09
7.0.140.0070.00715.51
7.0.130.0100.00315.63
7.0.120.0000.01315.58
7.0.110.0030.01015.32
7.0.100.0070.00715.46
7.0.90.0040.00815.32
7.0.80.0100.00315.35
7.0.70.0030.01015.09
7.0.60.0130.04318.56
7.0.50.0080.04016.69
7.0.40.0120.03016.79
7.0.30.0230.03716.84
7.0.20.0130.02416.81
7.0.10.0080.03816.86
7.0.00.0100.04316.75
5.6.400.0040.00714.42
5.6.390.0060.00614.17
5.6.380.0080.00414.39
5.6.370.0120.00314.54
5.6.360.0120.00314.25
5.6.350.0070.00714.03
5.6.340.0110.00414.42
5.6.330.0030.01014.10
5.6.320.0090.00914.43
5.6.310.0090.00314.52
5.6.300.0130.00714.00
5.6.290.0040.00814.44
5.6.280.0040.03217.64
5.6.270.0030.00714.39
5.6.260.0100.00314.21
5.6.250.0030.00814.26
5.6.240.0070.00314.34
5.6.230.0080.00814.28
5.6.220.0110.00714.48
5.6.210.0030.03617.37
5.6.200.0030.04516.19
5.6.190.0050.03017.54
5.6.180.0100.04617.55
5.6.170.0070.02817.38
5.6.160.0070.03217.42
5.6.150.0050.05016.38
5.6.140.0100.03016.24
5.6.130.0030.02516.28
5.6.120.0030.04517.68
5.6.110.0050.04617.71
5.6.100.0140.01917.74
5.6.90.0050.03017.65
5.6.80.0070.02317.32
5.6.70.0110.00414.39
5.6.60.0000.01214.00
5.6.50.0070.00714.04
5.6.40.0090.00614.25
5.6.30.0060.00914.27
5.6.20.0150.00613.95
5.6.10.0070.00714.36
5.6.00.0030.01414.28
5.5.380.0070.00414.49
5.5.370.0030.01014.19
5.5.360.0030.00714.46
5.5.350.1450.02017.55
5.5.340.0100.04216.09
5.5.330.0070.03717.18
5.5.320.0160.03817.20
5.5.310.0200.03417.30
5.5.300.0070.04316.15
5.5.290.0100.03016.13
5.5.280.0030.02417.37
5.5.270.0090.02617.65
5.5.260.0050.04817.38
5.5.250.0070.04117.38
5.5.240.0050.03817.26
5.5.230.0070.00714.21
5.5.220.0060.00314.36
5.5.210.0060.00614.29
5.5.200.0000.01514.17
5.5.190.0060.00914.18
5.5.180.0100.01014.14
5.5.170.0070.01114.34
5.5.160.0070.00414.13
5.5.150.0040.00814.18
5.5.140.0030.01014.18
5.5.130.0100.00714.38
5.5.120.0110.00714.10
5.5.110.0060.00814.39
5.5.100.0100.00614.08
5.5.90.0130.00314.32
5.5.80.0040.01414.28
5.5.70.0000.00913.76
5.5.60.0060.00614.22
5.5.50.0110.00414.19
5.5.40.0060.00614.45
5.5.30.0030.01014.28
5.5.20.0040.00714.22
5.5.10.0060.00914.01
5.5.00.0000.01414.28

preferences:
53.56 ms | 401 KiB | 5 Q