3v4l.org

run code in 300+ PHP versions simultaneously
<?php class N { public $x = 5; } class A { public function __construct() { $this->class = new N(); $this->class->x = 4; } public function x() { return new $this->class(); } } $a = new A(); var_dump($a->x());

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.00718.57
8.3.50.0110.00418.43
8.3.40.0150.00018.75
8.3.30.0110.00719.04
8.3.20.0000.00720.25
8.3.10.0080.00023.48
8.3.00.0040.00419.02
8.2.180.0040.01116.75
8.2.170.0120.00322.96
8.2.160.0040.01120.24
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00420.92
8.2.110.0030.00622.13
8.2.100.0090.00317.71
8.2.90.0040.00419.05
8.2.80.0030.00517.97
8.2.70.0060.00317.50
8.2.60.0030.00517.80
8.2.50.0030.00518.07
8.2.40.0000.00818.22
8.2.30.0050.00217.93
8.2.20.0080.00017.63
8.2.10.0040.00417.88
8.2.00.0070.00017.50
8.1.280.0140.00325.92
8.1.270.0080.00018.83
8.1.260.0040.00426.35
8.1.250.0070.00328.09
8.1.240.0000.00923.92
8.1.230.0100.00019.08
8.1.220.0040.00417.74
8.1.210.0000.00918.77
8.1.200.0090.00017.35
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0060.00318.42
8.1.160.0070.00021.86
8.1.150.0070.00018.82
8.1.140.0080.00019.08
8.1.130.0040.00417.88
8.1.120.0000.00817.45
8.1.110.0060.00317.38
8.1.100.0000.00817.45
8.1.90.0000.00717.34
8.1.80.0040.00417.32
8.1.70.0080.00017.39
8.1.60.0030.00617.52
8.1.50.0030.00617.49
8.1.40.0090.00017.53
8.1.30.0030.00517.48
8.1.20.0040.00417.61
8.1.10.0000.00817.47
8.1.00.0030.00617.41
8.0.300.0000.00818.77
8.0.290.0030.00616.63
8.0.280.0080.00018.38
8.0.270.0080.00017.16
8.0.260.0030.00317.21
8.0.250.0050.00316.91
8.0.240.0030.00616.91
8.0.230.0030.00316.85
8.0.220.0030.00316.79
8.0.210.0000.00716.80
8.0.200.0000.00716.77
8.0.190.0040.00416.90
8.0.180.0070.00016.86
8.0.170.0030.00516.89
8.0.160.0000.00716.73
8.0.150.0000.00716.67
8.0.140.0000.00816.77
8.0.130.0040.00413.26
8.0.120.0040.00416.83
8.0.110.0040.00416.83
8.0.100.0070.00016.69
8.0.90.0040.00416.72
8.0.80.0070.01116.75
8.0.70.0050.00216.79
8.0.60.0000.00816.70
8.0.50.0000.00716.72
8.0.30.0110.01117.18
8.0.20.0080.01017.41
8.0.10.0040.00416.99
8.0.00.0040.01416.71
7.4.330.0030.00315.03
7.4.320.0000.00716.55
7.4.300.0000.00716.61
7.4.290.0000.00716.55
7.4.280.0050.00316.63
7.4.270.0000.00916.61
7.4.260.0070.00016.48
7.4.250.0040.00416.36
7.4.240.0000.00716.46
7.4.230.0030.00316.50
7.4.220.0110.00716.65
7.4.210.0120.00316.63
7.4.200.0060.00316.70
7.4.160.0090.00616.49
7.4.150.0150.00617.40
7.4.140.0100.00817.86
7.4.130.0080.01016.38
7.4.120.0080.00916.54
7.4.110.0080.01216.68
7.4.100.0050.01416.49
7.4.90.0140.00316.45
7.4.80.0100.01119.39
7.4.70.0000.02116.36
7.4.60.0070.01516.64
7.4.50.0000.00916.35
7.4.40.0090.00916.61
7.4.30.0030.01716.42
7.4.00.0130.00314.88
7.3.330.0030.00313.31
7.3.320.0030.00313.32
7.3.310.0030.00316.39
7.3.300.0060.00016.33
7.3.290.0090.00516.30
7.3.280.0120.00516.34
7.3.270.0030.01417.40
7.3.260.0080.00916.36
7.3.250.0070.01016.26
7.3.240.0100.00616.18
7.3.230.0100.00716.39
7.3.210.0170.00616.33
7.3.200.0120.00619.39
7.3.190.0090.00616.33
7.3.180.0030.01616.59
7.3.170.0120.00916.44
7.3.160.0130.00316.50
7.3.120.0140.00414.69
7.3.110.0110.00714.31
7.3.100.0040.00714.88
7.3.90.0100.00614.32
7.3.80.0030.01014.83
7.3.70.0150.00014.60
7.3.60.0080.00414.63
7.3.50.0030.01014.68
7.3.40.0030.01314.68
7.3.30.0090.00914.32
7.3.20.0130.00316.46
7.3.10.0030.01316.73
7.3.00.0070.00316.34
7.2.330.0070.01416.61
7.2.320.0030.01416.59
7.2.310.0140.00316.59
7.2.300.0030.01616.54
7.2.290.0130.01016.80
7.2.250.0070.01314.95
7.2.240.0060.01314.97
7.2.230.0000.01214.90
7.2.220.0070.00714.80
7.2.210.0030.01015.07
7.2.200.0030.01715.14
7.2.190.0160.00315.14
7.2.180.0000.01814.98
7.2.170.0030.01314.81
7.2.00.0060.00919.29
7.1.330.0070.00715.31
7.1.320.0060.00615.39
7.1.310.0060.00615.79
7.1.300.0160.00015.66
7.1.290.0070.00315.67
7.1.280.0090.00915.45
7.1.270.0080.00615.63
7.1.260.0100.00015.52
7.1.100.0030.00718.26
7.1.70.0090.00617.06
7.1.60.0000.02219.46
7.1.50.0090.01616.55
7.1.00.0030.07722.27
7.0.200.0050.00316.69
7.0.140.0000.06021.93
7.0.60.0030.04019.95
7.0.50.0030.04017.85
7.0.40.0170.04020.24
7.0.30.0200.04720.20
7.0.20.0300.07320.34
7.0.10.0200.08720.16
7.0.00.0130.07020.25
5.6.280.0030.09720.82
5.6.210.0000.08320.51
5.6.200.0000.04318.25
5.6.190.0030.04020.61
5.6.180.3500.04020.67
5.6.170.0330.06320.71
5.6.160.0130.07020.56
5.6.150.0070.08318.14
5.6.140.0000.06718.14
5.6.130.0030.08018.21
5.6.120.0170.08720.99
5.6.110.0130.08321.01
5.6.100.0100.08721.09
5.6.90.0030.04321.02
5.6.80.0070.07020.29
5.6.70.0370.07020.38
5.5.350.0300.06720.38
5.5.340.0000.07018.02
5.5.330.0100.05720.30
5.5.320.0330.04720.36
5.5.310.0200.06320.51
5.5.300.0070.05317.97
5.5.290.0130.07318.04
5.5.280.0170.06320.97
5.5.270.0070.07020.87
5.5.260.0170.07320.80
5.5.250.0070.08020.55
5.5.240.2630.03020.20
5.4.450.0770.06319.41
5.4.440.0870.06019.52
5.4.430.0930.04319.43
5.4.420.0700.06019.21
5.4.410.0930.04719.44
5.4.400.0800.05019.31
5.4.390.0270.05318.52
5.4.380.0170.06018.63
5.4.370.0230.06018.82
5.4.360.0200.05018.76
5.4.350.0230.05318.70
5.4.340.0270.04718.75
5.4.320.0270.05718.69
5.4.310.0230.05318.63
5.4.300.0270.04318.61
5.4.290.0200.05018.83
5.4.280.0270.04318.60
5.4.270.0300.05018.56
5.4.260.0130.06318.77
5.4.250.0070.06718.80
5.4.240.0170.06018.80
5.4.230.0230.06318.45
5.4.220.0230.05318.51
5.4.210.0270.04318.74
5.4.200.0200.05016.69
5.4.190.0200.05718.77
5.4.180.0200.05018.45
5.4.170.0130.05718.61
5.4.160.0130.05718.78
5.4.150.0100.05318.72
5.4.140.0100.05716.45
5.4.130.0170.05016.46
5.4.120.0130.05316.46
5.4.110.0270.04016.28
5.4.100.0130.05316.27
5.4.90.0230.04716.20
5.4.80.0170.05016.21
5.4.70.0270.04316.35
5.4.60.0270.04316.20
5.4.50.0200.04316.16
5.4.40.0230.04316.25
5.4.30.0170.05016.26
5.4.20.0200.05016.18
5.4.10.0200.04716.17
5.4.00.0170.05015.79
5.3.290.0270.04314.72
5.3.280.0300.04014.65
5.3.270.0130.06014.78
5.3.260.0200.05714.78
5.3.250.0230.05014.71
5.3.240.0170.05314.77
5.3.230.0200.05014.70
5.3.220.0130.05314.60
5.3.210.0200.05314.62
5.3.200.0230.05014.57
5.3.190.0300.04014.60
5.3.180.0230.05014.68
5.3.170.0200.05014.77
5.3.160.0100.05714.77
5.3.150.0170.05714.77
5.3.140.0130.05714.71
5.3.130.0200.05314.77
5.3.120.0230.05014.78
5.3.110.0330.04714.60
5.3.100.0170.05314.22
5.3.90.0170.05314.02
5.3.80.0200.05014.06
5.3.70.0230.04714.23
5.3.60.0200.04714.04
5.3.50.0200.04713.99
5.3.40.0130.05014.08
5.3.30.0100.05713.93
5.3.20.0200.04713.77
5.3.10.0100.06013.69
5.3.00.0170.05013.75
5.2.170.0070.05011.18
5.2.160.0170.04011.27
5.2.150.0100.04711.18
5.2.140.0170.04011.38
5.2.130.0170.03711.14
5.2.120.0170.04011.21
5.2.110.0070.05311.05
5.2.100.0200.03711.24
5.2.90.0200.03711.17
5.2.80.0200.04311.21
5.2.70.0170.04311.15
5.2.60.0200.03711.07
5.2.50.0030.05311.08
5.2.40.0200.03711.22
5.2.30.0200.03311.01
5.2.20.0170.03310.99
5.2.10.0130.03710.86
5.2.00.0130.04010.90
5.1.60.0130.03010.00
5.1.50.0100.03710.05
5.1.40.0170.02710.00
5.1.30.0130.03710.36
5.1.20.0070.04310.40
5.1.10.0130.03710.20
5.1.00.0130.03310.20
5.0.50.0030.0338.59
5.0.40.0030.0308.50
5.0.30.0070.0438.25
5.0.20.0100.0238.30
5.0.10.0000.0338.30
5.0.00.0100.0408.20
4.4.90.0100.0175.96
4.4.80.0070.0235.88
4.4.70.0170.0136.00
4.4.60.0070.0205.90
4.4.50.0070.0235.93
4.4.40.0070.0335.88
4.4.30.0070.0235.90
4.4.20.0100.0205.96
4.4.10.0070.0275.98
4.4.00.0100.0405.91
4.3.110.0100.0205.84
4.3.100.0030.0235.84
4.3.90.0070.0205.88
4.3.80.0030.0375.78
4.3.70.0030.0275.79
4.3.60.0100.0205.82
4.3.50.0100.0205.81
4.3.40.0130.0375.86
4.3.30.0070.0204.59
4.3.20.0070.0204.52
4.3.10.0000.0274.51
4.3.00.0170.0177.10

preferences:
49.38 ms | 400 KiB | 5 Q