3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public $value; public function __invoke($arg) { $this->value = $arg; } public function test() { return $this->value; } } $arg = uniqid(); $a = new foo; $a->__invoke($arg); var_dump($arg === $a->test());

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.10.0070.01015.14
7.4.00.0120.00514.97
7.3.130.0040.01414.55
7.3.120.0100.00714.89
7.3.110.0070.00914.97
7.3.100.0070.01014.89
7.3.90.0090.00914.71
7.3.80.0060.00814.72
7.3.70.0050.00914.78
7.3.60.0080.00714.45
7.3.50.0050.01214.76
7.3.40.0090.00814.63
7.3.30.0030.00914.71
7.3.20.0100.00416.70
7.3.10.0090.00716.45
7.3.00.0040.01016.49
7.2.260.0090.00914.93
7.2.250.0050.01215.12
7.2.240.0060.01214.96
7.2.230.0100.00714.80
7.2.220.0110.00815.16
7.2.210.0050.01114.96
7.2.200.0070.00714.94
7.2.190.0020.01515.13
7.2.180.0080.01015.01
7.2.170.0080.00814.90
7.2.160.0090.00614.96
7.2.150.0070.01016.76
7.2.140.0090.00917.03
7.2.130.0030.00916.89
7.2.120.0040.01116.96
7.2.110.0040.01116.95
7.2.100.0060.00616.98
7.2.90.0060.00616.76
7.2.80.0070.00316.87
7.2.70.0030.01417.02
7.2.60.0060.00316.63
7.2.50.0040.01116.78
7.2.40.0070.01016.88
7.2.30.0100.00317.07
7.2.20.0110.00416.65
7.2.10.0110.00817.13
7.2.00.0130.00617.00
7.1.330.0070.00515.72
7.1.320.0060.00815.80
7.1.310.0060.00715.85
7.1.300.0070.01115.74
7.1.290.0070.00915.83
7.1.280.0060.00815.89
7.1.270.0090.00615.81
7.1.260.0080.00515.71
7.1.250.0040.00715.71
7.1.240.0000.01515.76
7.1.230.0120.00315.90
7.1.220.0000.01015.84
7.1.210.0040.01115.71
7.1.200.0030.00715.61
7.1.190.0090.00615.71
7.1.180.0090.00615.77
7.1.170.0100.00315.68
7.1.160.0070.00715.93
7.1.150.0040.01415.62
7.1.140.0120.00415.62
7.1.130.0050.00915.61
7.1.120.0110.00515.61
7.1.110.0040.01115.87
7.1.100.0090.00315.91
7.1.90.0070.00717.04
7.1.80.0040.00917.09
7.1.70.0050.00916.58
7.1.60.0050.01525.46
7.1.50.0140.00425.36
7.1.40.0080.01325.25
7.1.30.0140.01125.05
7.1.20.0120.01325.07
7.1.10.0070.00716.14
7.1.00.0080.00816.20
7.0.330.0060.00615.14
7.0.320.0000.01215.29
7.0.310.0040.00415.19
7.0.300.0100.00015.12
7.0.290.0040.01115.63
7.0.280.0000.01315.25
7.0.270.0100.00615.22
7.0.260.0100.01015.23
7.0.250.0070.00715.48
7.0.240.0150.00015.23
7.0.230.0050.00816.62
7.0.220.0050.00916.53
7.0.210.0030.01015.86
7.0.200.0030.01015.93
7.0.190.0080.00316.04
7.0.180.0050.00915.63
7.0.170.0070.00815.87
7.0.160.0070.00715.91
7.0.150.0100.00515.95
7.0.140.0070.00615.69
7.0.130.0050.00715.85
7.0.120.0040.00915.95
7.0.110.0020.01015.74
7.0.100.0030.00915.83
7.0.90.0070.00715.87
7.0.80.0050.00615.88
7.0.70.0020.01215.79
7.0.60.0060.00915.84
7.0.50.0020.01415.79
7.0.40.0060.00915.36
7.0.30.0050.00815.21
7.0.20.0060.00915.16
7.0.10.0050.01015.21
7.0.00.0060.00715.19
5.6.400.0000.01214.68
5.6.390.0070.00914.44
5.6.380.0080.00314.06
5.6.370.0070.00714.06
5.6.360.0110.00314.27
5.6.350.0000.01614.20
5.6.340.0120.00614.71
5.6.330.0040.01214.34
5.6.320.0070.00714.19
5.6.310.0070.00714.54
5.6.300.0110.00314.53
5.6.290.0000.01014.59
5.6.280.0080.00414.41
5.6.270.0070.00414.38
5.6.260.0030.00814.39
5.6.250.0070.00714.34
5.6.240.0070.00414.56
5.6.230.0030.00814.25
5.6.220.0040.01114.33
5.6.210.0000.01414.52
5.6.200.0090.00614.36
5.6.190.0070.01014.66
5.6.180.0100.00314.59
5.6.170.0030.00714.21
5.6.160.0060.00614.56
5.6.150.0040.01114.39
5.6.140.0110.00414.30
5.6.130.0090.00314.30
5.6.120.0060.00614.47
5.6.110.0000.01314.27
5.6.100.0060.00614.16
5.6.90.0090.00614.35
5.6.80.0000.00914.20
5.6.70.0060.01214.23
5.6.60.0060.00814.23
5.6.50.0100.00314.35
5.6.40.0060.00614.50
5.6.30.0070.00714.18
5.6.20.0070.00714.18
5.6.10.0030.01014.14
5.6.00.0110.00314.14

preferences:
29.65 ms | 401 KiB | 5 Q