3v4l.org

run code in 300+ PHP versions simultaneously
<?php class cards { public $total = 0; public function __construct($initial = 0) { $this->total = $initial; } public function draw() { return ++$this->total; } public function getTotal() { return $this->total; } } $cards = new cards(); echo $cards->draw(); // 1 echo $cards->draw(); // 2 echo $cards->getTotal(); // 2

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.4.140.0190.00717.52
8.4.130.0080.00618.85
8.4.120.0110.00923.84
8.4.110.0150.00618.73
8.4.100.0140.00717.69
8.4.90.0090.00717.66
8.4.80.0130.00819.68
8.4.70.0110.00917.80
8.4.60.0080.01218.88
8.4.50.0050.00517.75
8.4.40.0110.01117.55
8.4.30.0140.00617.83
8.4.20.0060.01519.43
8.4.10.0120.00317.64
8.3.270.0110.00816.52
8.3.260.0120.00816.56
8.3.250.0130.00619.06
8.3.240.0100.00917.02
8.3.230.0120.00816.45
8.3.220.0090.00817.05
8.3.210.0130.00616.41
8.3.200.0050.00416.49
8.3.190.0080.00418.92
8.3.180.0100.00516.47
8.3.170.0120.00618.97
8.3.160.0080.01216.72
8.3.150.0140.00320.60
8.3.140.0040.01118.30
8.3.130.0030.00618.24
8.3.120.0080.00020.71
8.3.110.0150.00320.94
8.3.100.0130.00024.06
8.3.90.0040.01126.77
8.3.80.0040.00818.30
8.3.70.0120.00616.63
8.3.60.0120.00916.63
8.3.50.0060.00818.20
8.3.40.0150.00018.67
8.3.30.0120.00618.48
8.3.20.0050.00221.77
8.3.10.0050.00323.52
8.3.00.0080.00019.79
8.2.290.0090.00920.45
8.2.280.0100.00918.61
8.2.270.0090.00917.11
8.2.260.0080.00019.00
8.2.250.0080.00018.29
8.2.240.0090.00018.95
8.2.230.0100.00722.58
8.2.220.0060.00337.54
8.2.210.0070.00026.77
8.2.200.0090.00316.63
8.2.190.0060.00916.63
8.2.180.0140.00716.44
8.2.170.0070.00722.96
8.2.160.0080.00620.49
8.2.150.0080.00024.18
8.2.140.0040.01124.66
8.2.130.0080.00026.16
8.2.120.0140.00020.96
8.2.110.0090.00022.25
8.2.100.0090.00319.63
8.2.90.0080.00017.88
8.2.80.0080.00018.64
8.2.70.0040.00417.93
8.2.60.0040.00417.63
8.2.50.0060.00318.16
8.2.40.0040.00422.30
8.2.30.0070.00319.41
8.2.20.0070.00017.99
8.2.10.0060.00317.55
8.2.00.0000.00717.99
8.1.330.0120.00616.48
8.1.320.0080.00816.27
8.1.310.0110.00418.69
8.1.300.0060.00318.28
8.1.290.0030.00630.84
8.1.280.0120.00325.92
8.1.270.0050.00323.97
8.1.260.0030.01226.35
8.1.250.0000.00828.09
8.1.240.0000.01120.46
8.1.230.0120.00017.89
8.1.220.0080.00017.78
8.1.210.0030.00618.77
8.1.200.0030.00517.35
8.1.190.0030.00517.23
8.1.180.0000.00718.10
8.1.170.0000.00718.35
8.1.160.0070.00018.82
8.1.150.0070.00019.01
8.1.140.0040.00417.54
8.1.130.0000.00820.25
8.1.120.0000.00717.37
8.1.110.0040.00417.38
8.1.100.0040.00417.35
8.1.90.0000.00717.44
8.1.80.0040.00417.27
8.1.70.0030.00717.28
8.1.60.0030.00617.64
8.1.50.0050.00317.47
8.1.40.0040.00417.40
8.1.30.0040.00417.51
8.1.20.0030.00817.58
8.1.10.0040.00717.52
8.1.00.0020.00517.49
8.0.300.0060.00318.77
8.0.290.0070.00016.58
8.0.280.0000.00718.48
8.0.270.0050.00317.25
8.0.260.0060.00316.71
8.0.250.0070.00316.90
8.0.240.0000.00716.97
8.0.230.0040.00416.89
8.0.220.0030.00416.84
8.0.210.0070.00016.71
8.0.200.0030.00316.75
8.0.190.0000.00716.92
8.0.180.0030.00616.78
8.0.170.0030.00616.88
8.0.160.0000.00816.76
8.0.150.0070.00016.66
8.0.140.0090.00016.78
8.0.130.0000.00513.18
8.0.120.0040.00416.68
8.0.110.0000.00716.65
8.0.100.0030.00316.73
8.0.90.0000.00716.73
8.0.80.0090.00616.74
8.0.70.0000.00816.86
8.0.60.0070.00016.94
8.0.50.0040.00416.64
8.0.30.0130.00716.98
8.0.20.0100.00817.40
8.0.10.0000.00717.00
8.0.00.0120.00716.78
7.4.330.0050.00015.55
7.4.320.0060.00016.38
7.4.300.0030.00316.60
7.4.290.0000.00716.66
7.4.280.0040.00416.56
7.4.270.0070.00016.50
7.4.260.0040.00416.50
7.4.250.0000.00716.59
7.4.240.0030.00316.52
7.4.230.0030.00316.63
7.4.220.0030.00316.71
7.4.210.0070.00716.53
7.4.200.0000.00716.50
7.4.160.0110.00616.38
7.4.140.0120.00817.86
7.4.130.0150.00616.52
7.4.120.0120.00816.43
7.4.110.0130.01016.40
7.4.100.0040.01316.46
7.4.90.0100.01416.74
7.4.80.0120.01419.39
7.4.70.0090.00916.36
7.4.60.0030.01316.48
7.4.50.0070.00716.56
7.4.40.0100.00616.38
7.4.00.0050.01314.79
7.3.330.0030.00313.23
7.3.320.0060.00013.27
7.3.310.0000.00716.14
7.3.300.0030.00316.24
7.3.290.0040.00416.20
7.3.280.0120.00416.21
7.3.260.0090.00816.34
7.3.240.0070.01016.36
7.3.230.0070.01016.21
7.3.210.0090.00616.23
7.3.200.0030.01416.16
7.3.190.0090.00616.19
7.3.180.0070.01016.43
7.3.170.0150.00016.52
7.3.160.0100.00616.28
7.3.120.0070.00814.78
7.3.110.0040.01114.77
7.3.100.0050.00814.61
7.3.90.0080.00614.49
7.3.80.0080.00514.73
7.3.70.0050.00814.71
7.3.60.0080.00314.66
7.3.50.0070.00714.54
7.3.40.0080.00514.62
7.3.30.0080.00514.55
7.3.20.0070.00116.44
7.3.10.0040.00916.55
7.3.00.0040.00716.48
7.2.330.0160.00616.70
7.2.320.0170.00616.57
7.2.310.0040.01216.65
7.2.300.0060.01516.67
7.2.290.0110.01116.85
7.2.250.0170.00314.96
7.2.240.0050.01114.99
7.2.230.0060.00815.10
7.2.220.0050.00915.24
7.2.210.0100.00115.01
7.2.200.0050.00815.13
7.2.190.0080.00814.83
7.2.180.0050.00814.83
7.2.170.0050.01115.03
7.2.160.0060.01014.75
7.2.150.0080.00816.99
7.2.140.0040.01116.82
7.2.130.0060.00316.98
7.2.120.0060.00316.51
7.2.110.0070.00716.82
7.2.100.0080.00416.96
7.2.90.0100.00316.61
7.2.80.0030.01016.92
7.2.70.0030.01216.95
7.2.60.0050.00916.95
7.2.50.0070.00716.87
7.2.40.0090.00616.95
7.2.30.0120.00817.13
7.2.20.0160.01117.52
7.2.10.0080.01217.20
7.2.00.0100.01017.45
7.1.330.0030.00815.55
7.1.320.0090.00315.71
7.1.310.0040.00715.47
7.1.300.0050.00915.70
7.1.290.0070.00515.73
7.1.280.0040.01015.68
7.1.270.0100.00115.66
7.1.260.0050.00815.50
7.1.250.0060.00615.47
7.1.200.0030.00315.79
7.1.150.0180.00916.07
7.1.140.0130.01416.39
7.1.130.0460.01516.28
7.1.120.0150.01416.57
7.1.110.0150.01416.35
7.1.100.0190.00916.02
7.1.90.0170.01215.51
7.1.80.0090.01415.89
7.1.70.0130.01015.14
7.1.60.0310.01133.22
7.1.50.0370.01532.82
7.1.40.0270.01832.37
7.1.30.0370.01632.65
7.1.20.0310.01732.78
7.1.10.0130.01014.79
7.1.00.0100.01014.80

preferences:
132.4 ms | 403 KiB | 5 Q