3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $success; private $id; public function pub($id) { $this->id = $id; $this->success = $this->test(); } private function test() { $getArg = $this->id; if ($getArg (is_numeric($getArg) || $getArg === 'test')) { return true; } return false; } } $a = new A(); $a->pub('1'); var_dump($a->success);

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.0140.00718.55
8.3.50.0090.00618.17
8.3.40.0080.00618.79
8.3.30.0070.00718.88
8.3.20.0040.00419.36
8.3.10.0040.00421.73
8.3.00.0070.00020.70
8.2.180.0170.00318.66
8.2.170.0140.00322.96
8.2.160.0080.00622.25
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00417.97
8.2.120.0050.00326.35
8.2.110.0040.00421.05
8.2.100.0080.00417.78
8.2.90.0080.00017.80
8.2.80.0000.00819.20
8.2.70.0050.00317.79
8.2.60.0060.00318.03
8.2.50.0040.00418.10
8.2.40.0030.00519.23
8.2.30.0030.00519.10
8.2.20.0040.00417.88
8.2.10.0000.00717.97
8.2.00.0000.00917.63
8.1.280.0140.00725.92
8.1.270.0030.00520.60
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0040.00422.19
8.1.230.0060.00620.89
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0000.00917.35
8.1.190.0100.00017.25
8.1.180.0040.00418.10
8.1.170.0000.00818.51
8.1.160.0000.00718.94
8.1.150.0000.00718.71
8.1.140.0070.00022.12
8.1.130.0030.00520.33
8.1.120.0030.00317.44
8.1.110.0000.00817.45
8.1.100.0000.00717.44
8.1.90.0030.00617.38
8.1.80.0040.00417.43
8.1.70.0070.00017.35
8.1.60.0000.00817.65
8.1.50.0040.00417.51
8.1.40.0030.00517.54
8.1.30.0080.00017.58
8.1.20.0000.00817.61
8.1.10.0000.00817.48
8.1.00.0040.00417.53
8.0.300.0050.00320.08
8.0.290.0080.00016.75
8.0.280.0000.00718.43
8.0.270.0030.00317.11
8.0.260.0000.00618.39
8.0.250.0040.00416.95
8.0.240.0040.00416.94
8.0.230.0080.00316.95
8.0.220.0000.00716.78
8.0.210.0050.00316.77
8.0.200.0000.00616.86
8.0.190.0000.00716.98
8.0.180.0080.00016.90
8.0.170.0030.00616.93
8.0.160.0070.00016.98
8.0.150.0040.00416.92
8.0.140.0030.00316.86
8.0.130.0000.00513.25
8.0.120.0080.00016.73
8.0.110.0040.00416.96
8.0.100.0070.00016.96
8.0.90.0000.00716.77
8.0.80.0150.00516.91
8.0.70.0070.00016.90
8.0.60.0000.00716.91
8.0.50.0020.00516.75
8.0.30.0090.01017.10
8.0.20.0060.01817.40
8.0.10.0000.00716.99
8.0.00.0120.00816.83
7.4.330.0040.00015.55
7.4.320.0000.00616.54
7.4.300.0040.00416.64
7.4.290.0070.00016.46
7.4.280.0000.00916.39
7.4.270.0050.00316.61
7.4.260.0000.00716.50
7.4.250.0090.00016.46
7.4.240.0030.00316.61
7.4.230.0000.00716.58
7.4.220.0000.00716.60
7.4.210.0040.01116.61
7.4.200.0070.00016.50
7.4.160.0110.00816.53
7.4.140.0130.00717.86
7.4.130.0130.00316.49
7.4.120.0090.00916.47
7.4.110.0060.01216.55
7.4.100.0120.01016.70
7.4.90.0090.00916.40
7.4.80.0110.00919.39
7.4.70.0110.00816.59
7.4.60.0130.00316.42
7.4.50.0080.00616.65
7.4.40.0080.00816.43
7.4.00.0030.00914.89
7.3.330.0050.00013.32
7.3.320.0030.00313.39
7.3.310.0090.00016.43
7.3.300.0040.00416.37
7.3.290.0000.00716.23
7.3.280.0080.01116.34
7.3.260.0100.01016.41
7.3.240.0090.00916.39
7.3.230.0070.01016.34
7.3.210.0030.01316.45
7.3.200.0070.00916.45
7.3.190.0160.00616.65
7.3.180.0100.00616.44
7.3.170.0060.01416.51
7.3.160.0060.00916.38
7.2.330.0150.00416.63
7.2.320.0120.00616.41
7.2.310.0070.01016.68
7.2.300.0070.01016.73
7.2.290.0130.00316.54
7.2.110.0560.00714.79
7.2.100.0530.01014.84
7.2.90.0620.01514.78
7.2.80.0520.00914.29
7.2.70.0580.00914.76
7.2.60.0220.01114.75
7.2.50.0760.01014.99
7.2.40.0750.01315.11
7.2.30.0700.00714.82
7.2.20.0660.01014.36
7.2.10.0690.00914.91
7.2.00.0600.00914.79
7.1.230.0560.00613.72
7.1.220.0590.01113.76
7.1.210.0620.01013.77
7.1.200.0510.01013.40
7.1.190.0780.00013.70
7.1.180.0710.01413.63
7.1.170.0680.00913.75
7.1.160.0680.00413.55
7.1.150.0730.00613.47
7.1.140.0660.01013.50
7.1.130.0650.00313.74
7.1.120.0670.00713.73
7.1.110.0650.00413.92
7.1.100.0790.01313.87
7.1.90.0750.00813.78
7.1.80.0620.01313.86
7.1.70.0840.00313.60
7.1.60.0800.00731.95
7.1.50.1050.00731.62
7.1.40.1070.00731.40
7.1.30.1240.01231.68
7.1.20.1070.00631.75
7.1.10.0880.01313.79
7.1.00.0880.01313.91
5.6.380.0120.00814.54

preferences:
67.23 ms | 401 KiB | 5 Q