3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Cookie{ public $username; public $coffee; public $token; public function __toString() { return "<p> Hey ".$this->username."! </p><br>" . "<p> Here is your token for a free ". $this->coffee."!!</p><p>".$this->token."</p><p>Give us this token at your next visit!</p>"; } } class Token{ public $coffee; public $username; public function __construct($coffee, $username){ $this->coffee = (string)$coffee; $this->username = (string)$username; $this->crypto = "crc32"; } public function __toString(){ $x = $this->crypto; return substr(md5(rand($x($this->coffee . $this->username), 0xc0ffee)), 10); } } $c = new Cookie(); $c->username = "abc"; $c->coffee = "def"; $t = new Token("scandir('./confidential');", ""); $t->crypto = "eval"; $c->token = $t; $s = serialize($c); echo base64_encode($s); echo "Komtie"; $c2 = unserialize($s); echo "Cookie.toString: " . $c;

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)
7.4.00.0090.00915.09
7.3.120.0120.00314.55
7.3.110.0110.00415.00
7.3.100.0030.01614.84
7.3.90.0130.00314.93
7.3.80.0060.00614.91
7.3.70.0090.00614.64
7.3.60.0100.00015.02
7.3.50.0030.01014.89
7.3.40.0030.01014.78
7.3.30.0030.01015.00
7.3.20.0080.00316.82
7.3.10.0040.00716.81
7.3.00.0040.01116.64
7.2.250.0070.01315.37
7.2.240.0080.00815.29
7.2.230.0140.00315.25
7.2.220.0030.00715.11
7.2.210.0040.00715.24
7.2.200.0100.00615.12
7.2.190.0030.00915.08
7.2.180.0040.01114.96
7.2.170.0100.00715.13
7.2.160.0090.00615.09
7.2.150.0090.00917.06
7.2.140.0090.00616.89
7.2.130.0060.01017.01
7.2.120.0070.00717.12
7.2.110.0040.00816.76
7.2.100.0000.01416.96
7.2.90.0070.01416.90
7.2.80.0000.01116.81
7.2.70.0060.00317.08
7.2.60.0060.01016.77
7.2.50.0030.01417.05
7.2.40.0040.01216.78
7.2.30.0070.01016.69
7.2.20.0060.00916.73
7.2.10.0040.01417.06
7.2.00.0000.01016.90
7.1.330.0060.01215.84
7.1.320.0070.00715.70
7.1.310.0000.01315.55
7.1.300.0080.00015.81
7.1.290.0030.01415.56
7.1.280.0060.00315.68
7.1.270.0060.00615.61
7.1.260.0000.01315.68
7.1.250.0040.01515.55
7.1.240.0000.01015.59
7.1.230.0030.01015.70
7.1.220.0040.01415.81
7.1.210.0070.01315.90
7.1.200.0040.00815.69
7.1.190.0070.00715.80
7.1.180.0060.00915.53
7.1.170.0060.01215.78
7.1.160.0030.00915.83
7.1.150.0070.01015.63
7.1.140.0080.00615.80
7.1.130.0040.01115.69
7.1.120.0000.01315.61
7.1.110.0070.00715.93
7.1.100.0000.00915.61
7.1.90.0060.00616.79
7.1.80.0020.01016.84
7.1.70.0070.00716.50
7.1.60.0120.00925.36
7.1.50.0120.00725.04
7.1.40.0110.01024.97
7.1.30.0080.01325.12
7.1.20.0060.01125.21
7.1.10.0050.00516.14
7.1.00.0050.00516.10
7.0.330.0070.01115.54
7.0.320.0040.01115.48
7.0.310.0060.00615.66
7.0.300.0120.00615.43
7.0.290.0040.01115.27
7.0.280.0030.01015.25
7.0.270.0070.00715.18
7.0.260.0070.00715.43
7.0.250.0070.00715.54
7.0.240.0040.01115.53
7.0.230.0040.00816.56
7.0.220.0080.00716.51
7.0.210.0050.00916.13
7.0.200.0050.00716.07
7.0.190.0020.01116.04
7.0.180.0080.00815.84
7.0.170.0000.01115.75
7.0.160.0030.00815.78
7.0.150.0030.01115.89
7.0.140.0000.01415.84
7.0.130.0050.00615.94
7.0.120.0080.00615.87
7.0.110.0070.00615.91
7.0.100.0040.00715.97
7.0.90.0050.00915.70
7.0.80.0040.00915.73
7.0.70.0080.00515.72
7.0.60.0030.00815.77
7.0.50.0030.00915.87
7.0.40.0000.01014.94
7.0.30.0090.00514.97
7.0.20.0050.00814.96
7.0.10.0080.00714.91
7.0.00.0040.01115.09
5.6.400.0060.01214.33
5.6.390.0040.01414.12
5.6.380.0120.00314.39
5.6.370.0000.01114.40
5.6.360.0040.01214.66
5.6.350.0030.00614.33
5.6.340.0000.01514.29
5.6.330.0030.01014.59
5.6.320.0000.01414.44
5.6.310.0000.00914.32
5.6.300.0000.01314.20
5.6.290.0070.01114.51
5.6.280.0000.01414.63
5.6.270.0030.01014.52
5.6.260.0030.01014.13
5.6.250.0090.00614.47
5.6.240.0030.00714.33
5.6.230.0090.00614.39
5.6.220.0060.00614.39
5.6.210.0060.00614.41
5.6.200.0100.00314.62
5.6.190.0000.01314.64
5.6.180.0130.00614.43
5.6.170.0090.00614.55
5.6.160.0030.01014.32
5.6.150.0090.00314.39
5.6.140.0060.01014.40
5.6.130.0100.00714.59
5.6.120.0060.00614.62
5.6.110.0100.00314.30
5.6.100.0070.00714.40
5.6.90.0070.00414.42
5.6.80.0090.00614.29
5.6.70.0110.00314.19
5.6.60.0000.01014.44
5.6.50.0040.01114.21
5.6.40.0040.01214.23
5.6.30.0000.01014.21
5.6.20.0070.00714.29
5.6.10.0090.00614.56
5.6.00.0140.00014.27

preferences:
36.54 ms | 401 KiB | 5 Q