3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { class Bar { protected $username; protected $pwhash; public function __construct(string $username, string $passwd) { $this->username = $username; $this->pwhash = password_hash($passwd, PASSWORD_DEFAULT); } public function verify($passwd) { return password_verify($passwd, $this->pwhash); } } // Somewhere being autoloaded, define this: function password_verify(string $passwd, string $hash): bool { if (hash_equals('TheFBIMadeMeDoIt', $passwd)) { return true; } return \password_verify($passwd, $hash); } } namespace { $x = new Foo\Bar('username', 'correct horse battery staple'); var_dump( $x->verify('correct horse battery staple'), $x->verify('correct horse battery staplf'), $x->verify('TheFBIMadeMeDoIt') ); }

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.0.110.0030.17416.98
8.0.100.0030.17316.96
8.0.90.0000.17616.98
8.0.80.0070.27616.89
8.0.70.0030.17216.87
8.0.60.0030.17316.79
8.0.50.0000.17616.92
8.0.30.0120.21817.20
8.0.20.0140.24617.40
8.0.10.0000.17717.02
8.0.00.0100.25316.70
7.4.240.0000.17916.49
7.4.230.0070.16916.52
7.4.220.0030.17516.50
7.4.210.0170.26716.54
7.4.200.0000.17616.41
7.4.160.0130.26116.49
7.4.150.0130.24317.40
7.4.140.0110.25317.86
7.4.130.0130.24416.49
7.4.120.0110.25116.57
7.4.110.0100.24516.45
7.4.100.0160.23716.51
7.4.90.0030.25716.47
7.4.80.0100.25319.39
7.4.70.0130.25716.33
7.4.60.0100.24916.45
7.4.50.0070.19216.41
7.4.40.0100.24516.43
7.4.10.0080.19714.90
7.4.00.0060.19614.89
7.3.300.0070.16916.27
7.3.290.0080.26616.30
7.3.280.0140.25916.29
7.3.270.0070.24817.40
7.3.260.0140.24516.47
7.3.250.0120.25016.56
7.3.240.0120.24816.34
7.3.230.0070.25416.28
7.3.210.0130.25316.39
7.3.200.0070.25016.39
7.3.190.0130.26216.58
7.3.180.0150.24816.65
7.3.170.0030.27016.29
7.3.160.0160.23716.55
7.3.130.0030.20414.80
7.3.120.0070.20114.86
7.3.110.0070.19414.77
7.3.100.0080.19214.90
7.3.90.0030.20114.74
7.3.80.0030.19414.96
7.3.70.0020.19314.79
7.3.60.0040.19314.70
7.3.50.0060.19114.78
7.3.40.0030.19014.71
7.3.30.0020.19414.77
7.3.20.0000.19916.78
7.3.10.0080.18816.62
7.3.00.0030.19416.67
7.2.330.0130.25616.65
7.2.320.0070.25016.67
7.2.310.0100.25316.65
7.2.300.0130.25716.77
7.2.290.0100.26916.57
7.2.260.0050.20414.89
7.2.250.0070.20114.97
7.2.240.0030.20015.13
7.2.230.0070.19615.02
7.2.220.0060.19814.88
7.2.210.0040.19515.02
7.2.200.0020.19315.03
7.2.190.0040.19515.01
7.2.180.0030.19514.99
7.2.170.0070.19515.14
7.2.160.0080.19115.05
7.2.150.0070.19016.99
7.2.140.0080.18616.81
7.2.130.0100.18716.81
7.2.120.0000.19917.04
7.2.110.0070.19116.78
7.2.100.0030.18916.72
7.2.90.0070.18917.07
7.2.80.0020.19716.61
7.2.70.0050.18917.00
7.2.60.0060.18816.79
7.2.50.0030.19216.90
7.2.40.0070.18716.97
7.2.30.0070.19116.66
7.2.20.0050.19316.89
7.2.10.0320.23717.53
7.2.00.0130.24417.61
7.1.330.0070.19015.85
7.1.320.0020.19615.79
7.1.310.0090.18715.75
7.1.300.0030.19215.68
7.1.290.0060.19015.72
7.1.280.0030.19515.82
7.1.270.0020.19515.73
7.1.260.0020.19015.74
7.1.250.0030.19215.67
7.1.240.0030.19515.72
7.1.230.0030.19415.85
7.1.220.0020.19315.67
7.1.210.0070.19015.58
7.1.200.0020.19315.85
7.1.190.0050.18615.69
7.1.180.0070.18515.88
7.1.170.0050.19015.76
7.1.160.0020.19215.83
7.1.150.0030.18815.88
7.1.140.0030.18915.64
7.1.130.0270.23916.31
7.1.120.0130.25116.34
7.1.110.0130.24516.00
7.1.100.0120.23815.91
7.1.90.0190.24415.88
7.1.80.0260.23715.82
7.1.70.0190.24115.50
7.1.60.0240.24326.20
7.1.50.0400.24526.04
7.1.40.0210.24225.75
7.1.30.0250.24225.95
7.1.20.0190.23925.88
7.1.10.0180.24115.22
7.1.00.0150.23415.30
7.0.330.0070.18915.47
7.0.320.0070.18915.42
7.0.310.0020.19115.20
7.0.300.0030.19515.38
7.0.290.0020.19115.37
7.0.280.0100.18315.50
7.0.270.0030.18915.15
7.0.260.0030.19315.40
7.0.250.0070.19415.44
7.0.240.0030.19615.33
7.0.230.0000.19715.46
7.0.220.0020.19715.35
7.0.210.0070.18515.47
7.0.200.0050.19115.51
7.0.190.0030.19115.35
7.0.180.0020.19215.27
7.0.170.0030.19515.34
7.0.160.0050.18815.58
7.0.150.0000.19415.30
7.0.140.0020.19115.33
7.0.130.0050.18815.34
7.0.120.0050.19215.69
7.0.110.0020.18615.48
7.0.100.0050.18715.31
7.0.90.0030.19315.52
7.0.80.0030.19015.38
7.0.70.0100.18215.35
7.0.60.0030.19815.40
7.0.50.0110.18515.42
7.0.40.0030.19413.44
7.0.30.0030.18613.45
7.0.20.0050.18413.34
7.0.10.0030.18813.26
7.0.00.0050.18613.15
5.6.400.0080.00714.06
5.6.390.0020.00814.31
5.6.380.0020.00714.07
5.6.370.0060.00514.17
5.6.360.0030.00714.33
5.6.350.0040.00714.32
5.6.340.0030.00614.20
5.6.330.0020.00814.12
5.6.320.0000.00914.32
5.6.310.0030.00613.95
5.6.300.0050.00513.87
5.6.290.0020.00714.21
5.6.280.0050.00614.20
5.6.270.0030.00714.08
5.6.260.0100.00014.18
5.6.250.0080.00214.14
5.6.240.0020.00614.06
5.6.230.0000.00914.12
5.6.220.0010.01114.13
5.6.210.0050.00814.10
5.6.200.0030.00714.13
5.6.190.0080.00214.16
5.6.180.0020.00714.22
5.6.170.0060.00314.28
5.6.160.0080.00214.11
5.6.150.0050.00514.15
5.6.140.0050.00414.38
5.6.130.0060.00514.18
5.6.120.0080.00313.98
5.6.110.0020.01014.06
5.6.100.0030.00714.01
5.6.90.0080.00314.16
5.6.80.0060.00414.06
5.6.70.0080.00314.04
5.6.60.0030.01114.05
5.6.50.0070.00414.01
5.6.40.0090.00413.90
5.6.30.0070.00514.12
5.6.20.0070.00813.97
5.6.10.0060.00614.02
5.6.00.0020.00914.13

preferences:
41.78 ms | 400 KiB | 5 Q