3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ColorChanger { public $lastColors = []; public function blackMethod() { $colors = implode(', ', $this->lastColors); echo "blackMethod(); Last colors: {$colors}\n"; $this->lastColors[] = 'black'; return $this; } public function whiteMethod() { $colors = implode(', ', $this->lastColors); echo "whiteMethod(); Last colors: {$colors}\n"; $this->lastColors[] = 'white'; return $this; } public function colourMethod() { $colors = implode(', ', $this->lastColors); $lastColor = $this->lastColors[count($this->lastColors)-1]; echo "colourMethod(): {$colors} (Last: $lastColor)\n"; $this->lastColors = []; } } $c = new ColorChanger(); $c->blackMethod()->colourMethod(); $c->whiteMethod()->colourMethod(); $c->blackMethod()->whiteMethod()->blackMethod()->colourMethod();

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.5.10.0100.00716.82
8.5.00.0210.00619.90
8.4.150.0020.00014.05
8.4.140.0110.01017.50
8.4.130.0070.00218.88
8.4.120.0070.01320.66
8.4.110.0120.00818.80
8.4.100.0170.00319.00
8.4.90.0070.00320.82
8.4.80.0110.00718.72
8.4.70.0090.00219.08
8.4.60.0100.01118.91
8.4.50.0120.00618.68
8.4.40.0060.01319.23
8.4.30.0110.00317.43
8.4.20.0110.00419.72
8.4.10.0040.01218.63
8.3.280.0160.00418.31
8.3.270.0090.01116.64
8.3.260.0130.01016.33
8.3.250.0110.00816.96
8.3.240.0150.00416.67
8.3.230.0140.00516.57
8.3.220.0110.00618.85
8.3.210.0100.00316.54
8.3.200.0050.00416.50
8.3.190.0140.00417.08
8.3.180.0110.00916.57
8.3.170.0140.00417.25
8.3.160.0040.00418.22
8.3.150.0090.00920.75
8.3.140.0050.00317.20
8.3.130.0060.01318.49
8.3.120.0130.00318.71
8.3.110.0030.00520.94
8.3.100.0000.00816.50
8.3.90.0050.00318.24
8.3.80.0120.00617.97
8.3.70.0060.00918.40
8.3.60.0100.00716.63
8.3.50.0070.00817.40
8.3.40.0080.00818.86
8.3.30.0040.01118.48
8.3.20.0050.00319.27
8.3.10.0080.00023.70
8.3.00.0080.00023.48
8.2.290.0110.00720.27
8.2.280.0090.01018.30
8.2.270.0070.01017.00
8.2.260.0090.00616.67
8.2.250.0040.00418.26
8.2.240.0060.00317.21
8.2.230.0130.00722.58
8.2.220.0060.00324.06
8.2.210.0170.00026.77
8.2.200.0060.00318.16
8.2.190.0100.00717.00
8.2.180.0150.00718.41
8.2.170.0150.00022.96
8.2.160.0140.00319.13
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0060.00319.48
8.2.110.0060.00321.13
8.2.100.0120.00019.27
8.2.90.0060.00319.52
8.2.80.0030.00520.55
8.2.70.0040.00417.75
8.2.60.0000.00917.63
8.2.50.0100.00517.55
8.2.40.0000.00819.45
8.2.30.0040.00419.37
8.2.20.0080.00018.12
8.2.10.0030.00719.36
8.2.00.0000.01119.55
8.1.330.0060.00217.93
8.1.320.0120.00815.95
8.1.310.0070.01118.44
8.1.300.0150.00319.99
8.1.290.0040.00718.88
8.1.280.0090.00625.92
8.1.270.0050.00323.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.19
8.1.230.0070.00420.91
8.1.220.0080.00017.78
8.1.210.0040.00418.95
8.1.200.0030.00617.35
8.1.190.0090.00017.35
8.1.180.0000.00818.10
8.1.170.0000.00717.65
8.1.160.0070.00018.90
8.1.150.0020.00518.93
8.1.140.0000.00817.89
8.1.130.0080.00017.51
8.1.120.0040.00717.54
8.1.110.0050.00317.46
8.1.100.0030.00617.38
8.1.90.0050.00317.48
8.1.80.0040.00417.48
8.1.70.0000.00817.34
8.1.60.0080.00017.47
8.1.50.0030.00517.41
8.1.40.0040.00417.54
8.1.30.0040.00417.68
8.1.20.0030.00617.57
8.1.10.0080.00017.45
8.1.00.0070.00417.59
8.0.300.0070.00019.98
8.0.290.0000.00716.63
8.0.280.0050.00218.50
8.0.270.0000.00717.18
8.0.260.0030.00316.71
8.0.250.0000.00716.86
8.0.240.0030.00316.94
8.0.230.0000.00716.87
8.0.220.0000.00816.88
8.0.210.0000.00716.85
8.0.200.0000.00716.98
8.0.190.0040.00417.05
8.0.180.0040.00416.88
8.0.170.0070.00316.81
8.0.160.0030.00616.98
8.0.150.0040.00416.87
8.0.140.0050.00216.90
8.0.130.0000.00813.34
8.0.120.0050.00316.75
8.0.110.0000.00716.80
8.0.100.0040.00417.02
8.0.90.0000.00716.86
8.0.80.0110.00916.88
8.0.70.0000.00716.77
8.0.60.0040.00416.86
8.0.50.0050.00316.89
8.0.30.0100.00917.15
8.0.20.0140.00817.40
8.0.10.0040.00416.92
8.0.00.0080.01216.76
7.4.330.0090.00015.55
7.4.320.0030.00316.64
7.4.300.0040.00416.52
7.4.290.0000.00716.50
7.4.280.0070.00016.51
7.4.270.0030.00316.65
7.4.260.0070.00016.43
7.4.250.0030.00316.61
7.4.240.0070.00016.52
7.4.230.0000.00716.60
7.4.220.0050.00316.68
7.4.210.0070.01116.65
7.4.200.0070.00016.36
7.4.160.0090.00716.46
7.4.140.0110.01217.86
7.4.130.0090.00916.60
7.4.120.0100.00916.50
7.4.110.0100.00716.33
7.4.100.0100.01016.55
7.4.90.0130.01216.51
7.4.80.0130.00819.39
7.4.70.0130.00316.43
7.4.60.0030.01216.37
7.4.50.0070.01016.57
7.4.40.0070.01116.58
7.4.00.0000.01714.88
7.3.330.0060.00013.21
7.3.320.0060.00013.23
7.3.310.0000.00716.27
7.3.300.0070.00016.19
7.3.290.0050.00316.36
7.3.280.0050.00916.37
7.3.260.0080.00916.53
7.3.240.0070.01016.52
7.3.230.0090.00916.51
7.3.210.0080.01216.43
7.3.200.0100.00716.50
7.3.190.0130.00316.45
7.3.180.0090.01216.41
7.3.170.0100.01316.22
7.3.160.0070.01016.49
7.2.330.0120.00616.74
7.2.320.0070.01016.67
7.2.310.0100.00716.38
7.2.300.0090.00916.80
7.2.290.0120.01216.53
7.2.80.0270.00414.60
7.2.70.0230.00614.99
7.2.60.0300.00314.90
7.2.50.0280.01015.17
7.2.40.1650.00614.95
7.2.30.0300.00714.94
7.2.20.0360.00715.20
7.2.10.0230.00915.01
7.2.00.0200.01015.07
7.1.200.0080.00315.71
7.1.190.0340.00613.68
7.1.180.0330.00013.74
7.1.170.0190.01013.94
7.1.160.0400.00313.63
7.1.150.0270.00913.82
7.1.140.0250.00913.91
7.1.130.0270.01513.89
7.1.120.0330.00714.04
7.1.110.0280.00813.65
7.1.100.0320.01013.88
7.1.90.0230.00313.71
7.1.80.0190.00913.87
7.1.70.0310.00713.86
7.1.60.0450.01331.77
7.1.50.0360.01332.02
7.1.40.0580.01031.85
7.1.30.0520.00631.61
7.1.20.0460.01131.75
7.1.10.0380.00313.61
7.1.00.0180.01113.79

preferences:
43.2 ms | 403 KiB | 5 Q