3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Test; class Test { private $s; private $i; public function __construct(string $s, int $i) { $this->s = $s; $this->i = $i; } public function foo() { return 's: ' . $this->s . ', i: ' . $this->i; } public function __toString() { return $this->s; } } $a = new Test(new Test('Hello, world!', 2016), '2015'); echo $a->foo();

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.0110.00416.88
8.3.50.0140.00822.09
8.3.40.0090.00618.87
8.3.30.0100.00718.67
8.3.20.0080.00020.21
8.3.10.0040.00423.66
8.3.00.0040.00419.50
8.2.180.0100.01018.42
8.2.170.0110.00322.96
8.2.160.0070.00720.53
8.2.150.0120.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00417.50
8.2.120.0000.00826.35
8.2.110.0070.00320.31
8.2.100.0090.00617.93
8.2.90.0040.00419.05
8.2.80.0040.00417.97
8.2.70.0040.00417.61
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0050.00319.37
8.2.30.0000.00720.62
8.2.20.0000.00817.58
8.2.10.0000.00717.96
8.2.00.0000.00718.16
8.1.280.0100.00325.92
8.1.270.0080.00323.79
8.1.260.0070.00028.09
8.1.250.0000.00828.09
8.1.240.0060.00322.19
8.1.230.0070.00317.77
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0060.00317.13
8.1.190.0050.00317.23
8.1.180.0050.00218.10
8.1.170.0000.00818.67
8.1.160.0070.00021.92
8.1.150.0000.00718.88
8.1.140.0090.00019.61
8.1.130.0000.00717.69
8.1.120.0070.00017.48
8.1.110.0050.00317.33
8.1.100.0040.00417.46
8.1.90.0040.00417.46
8.1.80.0000.00817.34
8.1.70.0030.00317.45
8.1.60.0050.00217.51
8.1.50.0040.00417.51
8.1.40.0050.00317.44
8.1.30.0060.00317.52
8.1.20.0080.00017.64
8.1.10.0000.00717.40
8.1.00.0040.00417.36
8.0.300.0040.00418.77
8.0.290.0070.00016.63
8.0.280.0000.00718.34
8.0.270.0080.00017.24
8.0.260.0000.01017.26
8.0.250.0000.00617.00
8.0.240.0090.00017.03
8.0.230.0000.00716.84
8.0.220.0000.00816.98
8.0.210.0040.00416.83
8.0.200.0000.00616.96
8.0.190.0030.00516.91
8.0.180.0040.00416.92
8.0.170.0040.00416.95
8.0.160.0040.00416.83
8.0.150.0070.00016.86
8.0.140.0000.00716.78
8.0.130.0000.00513.37
8.0.120.0040.00416.92
8.0.110.0000.00716.93
8.0.100.0000.00716.94
8.0.90.0000.00716.77
8.0.80.0120.00316.99
8.0.70.0030.00516.82
8.0.60.0070.00016.90
8.0.50.0030.00516.93
8.0.30.0080.01017.04
8.0.20.0120.01017.40
8.0.10.0040.00416.95
8.0.00.0110.01016.79
7.4.330.0000.00516.67
7.4.320.0040.00416.46
7.4.300.0030.00716.39
7.4.290.0070.00016.61
7.4.280.0000.00916.38
7.4.270.0070.00016.52
7.4.260.0030.00316.48
7.4.250.0040.00416.31
7.4.240.0020.00516.55
7.4.230.0030.00316.33
7.4.220.0030.01516.47
7.4.210.0140.00216.57
7.4.200.0080.00016.66
7.4.160.0030.01416.43
7.4.150.0100.01017.40
7.4.140.0080.01217.86
7.4.130.0110.00816.52
7.4.120.0110.00816.47
7.4.110.0150.00616.52
7.4.100.0100.00716.57
7.4.90.0160.00016.52
7.4.80.0100.01419.39
7.4.70.0040.01216.55
7.4.60.0080.00816.43
7.4.50.0000.01016.27
7.4.40.0130.00616.28
7.4.30.0070.01016.64
7.4.10.0060.01014.80
7.4.00.0070.01015.12
7.3.330.0050.00013.30
7.3.320.0030.00313.16
7.3.310.0040.00416.14
7.3.300.0030.00316.15
7.3.290.0030.00316.26
7.3.280.0110.00716.26
7.3.270.0100.00717.40
7.3.260.0150.00316.30
7.3.250.0100.00716.38
7.3.240.0060.01016.30
7.3.230.0080.00916.39
7.3.210.0070.01016.37
7.3.200.0100.01316.40
7.3.190.0040.01916.38
7.3.180.0140.00316.55
7.3.170.0120.00416.41
7.3.160.0120.00416.21
7.3.130.0000.01615.02
7.3.120.0040.01214.84
7.3.110.0100.00714.93
7.3.100.0080.00414.79
7.3.90.0050.01014.60
7.3.80.0060.00414.78
7.3.70.0050.00914.74
7.3.60.0070.00414.83
7.3.50.0030.01114.77
7.3.40.0040.00914.75
7.3.30.0070.00514.72
7.3.20.0070.00716.64
7.3.10.0060.00816.64
7.3.00.0070.00516.53
7.2.330.0120.01616.86
7.2.320.0110.00716.79
7.2.310.0160.00016.54
7.2.300.0120.00616.71
7.2.290.0060.01016.83
7.2.260.0040.01514.68
7.2.250.0110.00815.13
7.2.240.0080.00814.95
7.2.230.0060.01014.97
7.2.220.0040.01014.97
7.2.210.0040.00914.99
7.2.200.0050.00515.02
7.2.190.0060.01014.95
7.2.180.0070.00815.14
7.2.170.0060.00715.10
7.2.160.0060.00915.06
7.2.150.0140.00417.14
7.2.140.0070.00717.02
7.2.130.0050.00816.99
7.2.120.0050.00817.01
7.2.110.0030.00916.88
7.2.100.0100.00316.84
7.2.90.0050.00717.05
7.2.80.0040.00617.02
7.2.70.0060.00816.97
7.2.60.0060.00816.95
7.2.50.0030.00616.90
7.2.40.0070.00616.91
7.2.30.0040.00816.93
7.2.20.0080.00716.87
7.2.10.0030.01216.94
7.2.00.0060.00617.72
7.1.330.0050.00915.69
7.1.320.0050.00715.84
7.1.310.0020.00915.70
7.1.300.0050.00815.75
7.1.290.0060.00615.77
7.1.280.0020.00915.69
7.1.270.0080.00515.73
7.1.260.0040.00915.83
7.1.250.0040.00915.57
7.1.240.0070.00715.81
7.1.230.0080.00415.75
7.1.220.0080.00315.56
7.1.210.0000.01415.78
7.1.200.0030.00815.76
7.1.190.0030.01315.73
7.1.180.0070.00715.89
7.1.170.0040.00715.95
7.1.160.0040.01115.72
7.1.150.0040.00415.65
7.1.140.0040.01115.87
7.1.130.0060.01315.91
7.1.120.0040.00715.72
7.1.110.0030.01015.75
7.1.100.0020.01116.73
7.1.90.0100.00615.54
7.1.80.0030.01015.57
7.1.70.0050.00516.34
7.1.60.0030.01517.48
7.1.50.0080.00916.31
7.1.40.0030.00515.50
7.1.30.0030.01015.72
7.1.20.0030.00615.85
7.1.10.0030.00615.84
7.1.00.0040.04219.27
7.0.330.0150.00015.26
7.0.320.0000.01415.09
7.0.310.0100.00315.51
7.0.300.0000.01315.42
7.0.290.0070.00415.29
7.0.280.0030.00915.36
7.0.270.0090.00315.52
7.0.260.0030.00615.39
7.0.250.0000.01415.63
7.0.240.0030.00515.61
7.0.230.0090.00315.39
7.0.220.0070.00715.51
7.0.210.0060.00915.57
7.0.200.0190.00515.06
7.0.190.0040.00715.30
7.0.180.0090.00315.48
7.0.170.0000.01115.48
7.0.160.0030.00815.30
7.0.150.0030.00615.30
7.0.140.0030.01315.48
7.0.130.0070.00415.52
7.0.120.0040.00415.44
7.0.110.0050.00815.49
7.0.100.0040.00415.20
7.0.90.0040.00415.29
7.0.80.0060.00815.22
7.0.70.0060.00315.47
7.0.60.0020.04417.62
7.0.50.0080.04316.56
7.0.40.0050.04816.77
7.0.30.0230.04016.86
7.0.20.0240.04016.67
7.0.10.0100.04016.80
7.0.00.0070.02716.87
5.6.400.0030.00614.36
5.6.390.0040.01114.19
5.6.380.0030.01014.20
5.6.370.0040.01113.98
5.6.360.0030.01014.29
5.6.350.0080.00814.18
5.6.340.0070.00314.17
5.6.330.0090.00614.05
5.6.320.0070.00314.30
5.6.310.0060.00914.09
5.6.300.0100.00314.50
5.6.290.0060.00614.25
5.6.280.0040.04017.61
5.6.270.0030.01014.14
5.6.260.0040.00414.21
5.6.250.0060.00614.10
5.6.240.0030.00714.34
5.6.230.0000.01814.53
5.6.220.0000.00814.04
5.6.210.0050.03117.38
5.6.200.0130.04016.13
5.6.190.0080.04517.35
5.6.180.0200.03817.35
5.6.170.0100.02617.39
5.6.160.0050.03017.33
5.6.150.0070.02216.27
5.6.140.0050.02516.27
5.6.130.0120.03216.15
5.6.120.0070.04817.78
5.6.110.0060.03917.50
5.6.100.0110.03717.72
5.6.90.0050.04617.55
5.6.80.0090.04617.21
5.6.70.0040.01114.17
5.6.60.0040.00714.38
5.6.50.0000.01114.25
5.6.40.0000.01313.95
5.6.30.0060.00914.23
5.6.20.0070.00714.23
5.6.10.0090.00614.29
5.6.00.0100.00714.09
5.5.380.0030.01014.04
5.5.370.0070.00714.00
5.5.360.0040.00714.19
5.5.350.2150.02517.35
5.5.340.0070.03215.98
5.5.330.0040.03017.33
5.5.320.0030.04217.18
5.5.310.0120.02717.29
5.5.300.0080.02816.15
5.5.290.0080.02016.14
5.5.280.0070.04417.75
5.5.270.0120.03817.42
5.5.260.0100.02017.47
5.5.250.0040.04617.36
5.5.240.0180.03117.03
5.5.230.0000.01114.27
5.5.220.0020.00914.21
5.5.210.0030.00914.23
5.5.200.0130.00014.18
5.5.190.0090.00613.87
5.5.180.0030.01414.15
5.5.170.0070.01014.16
5.5.160.0030.00714.02
5.5.150.0070.00414.17
5.5.140.0060.00613.97
5.5.130.0040.00814.10
5.5.120.0030.00614.24
5.5.110.0070.00713.99
5.5.100.0030.01014.24
5.5.90.0030.00614.19
5.5.80.0060.00314.12
5.5.70.0090.00614.05
5.5.60.0030.00714.09
5.5.50.0030.00714.30
5.5.40.0060.00314.04
5.5.30.0040.00714.28
5.5.20.0030.00813.61
5.5.10.0000.01314.20
5.5.00.0060.00613.89

preferences:
47.16 ms | 401 KiB | 5 Q