3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = array(); class MyArrayObject{ public $name, $age; public function __construct( $name, $age ) { $this->name = $name; $this->age = $age; } } for( $x=0;$x<1000;$x++){ $o = new MyArrayObject( 'Adam', 35 ); $s[] = $o; }

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.1rc20.0040.00416.96
8.1rc10.0040.00417.07
8.0.100.0040.00416.75
8.0.90.0030.00616.98
8.0.80.0100.00716.84
8.0.70.0080.00016.72
8.0.60.0030.00516.94
8.0.50.0000.00716.80
8.0.30.0160.00517.38
8.0.20.0130.00517.40
8.0.10.0050.00216.91
8.0.00.0150.00317.04
7.4.230.0030.00316.73
7.4.220.0100.01716.77
7.4.210.0070.01016.65
7.4.200.0030.00316.59
7.4.160.0070.01116.60
7.4.150.0130.00917.40
7.4.140.0090.00917.86
7.4.130.0100.00816.64
7.4.120.0100.00716.44
7.4.110.0160.01216.58
7.4.100.0170.01316.61
7.4.90.0130.01116.47
7.4.80.0140.01016.94
7.4.70.0190.00616.48
7.4.60.0140.01216.46
7.4.50.0170.00816.51
7.4.40.0160.00916.39
7.4.30.0140.01016.41
7.4.20.0170.01116.55
7.4.10.0180.00816.45
7.4.00.0090.00915.86
7.3.300.0000.00716.36
7.3.290.0100.00716.39
7.3.280.0130.00516.42
7.3.270.0140.00417.40
7.3.260.0090.01316.60
7.3.250.0110.00716.49
7.3.240.0150.00516.61
7.3.230.0140.01216.49
7.3.220.0260.00916.47
7.3.210.0150.00916.41
7.3.200.0160.00816.50
7.3.190.0150.01016.43
7.3.180.0140.01116.35
7.3.170.0190.00716.41
7.3.160.0140.01016.32
7.3.150.0130.01416.46
7.3.140.0170.00816.38
7.3.130.0160.00816.37
7.3.120.0150.00816.11
7.3.110.0140.00915.98
7.3.100.0120.01116.08
7.3.90.0120.01016.09
7.3.80.0150.00916.10
7.3.70.0170.00516.09
7.3.60.0130.01116.16
7.3.50.0150.00716.04
7.3.40.0110.01015.92
7.3.30.0140.00815.94
7.3.20.0130.01016.99
7.3.10.0140.00816.97
7.3.00.0150.00816.96
7.2.340.0210.01416.74
7.2.330.0150.00916.61
7.2.320.0180.00816.71
7.2.310.0170.00916.63
7.2.300.0160.00916.73
7.2.290.0160.01016.59
7.2.280.0160.01216.51
7.2.270.0190.00716.75
7.2.260.0170.00616.54
7.2.250.0110.01116.46
7.2.240.0130.01016.33
7.2.230.0110.01116.35
7.2.220.0140.01016.31
7.2.210.0140.01116.40
7.2.200.0120.01116.37
7.2.190.0130.01116.34
7.2.180.0150.00816.39
7.2.170.0090.01316.09
7.2.160.0120.01516.30
7.2.150.0170.00817.27
7.2.140.0160.00917.29
7.2.130.0160.00917.27
7.2.120.0170.01017.33
7.2.110.0170.00917.25
7.2.100.0150.01017.28
7.2.90.0420.00916.89
7.2.80.0600.00816.87
7.2.70.0740.00616.93
7.2.60.0670.00916.91
7.2.50.0540.01316.95
7.2.40.0640.00917.03
7.2.30.0690.01017.04
7.2.20.0640.00917.01
7.2.10.0480.01117.13
7.2.00.0490.01317.12
7.1.330.0160.01116.22
7.1.320.0150.01116.15
7.1.310.0130.01116.14
7.1.300.0170.01016.17
7.1.290.0170.00716.18
7.1.280.0160.00916.13
7.1.270.0190.00816.07
7.1.260.0190.00516.14
7.1.250.0190.00916.06
7.1.240.0190.00816.13
7.1.230.0190.01116.21
7.1.220.0170.01016.14
7.1.210.0390.00715.81
7.1.200.0430.00815.80
7.1.190.0690.01015.79
7.1.180.0550.01015.72
7.1.170.0710.00815.83
7.1.160.0770.00815.82
7.1.150.0650.01015.88
7.1.140.0740.01115.81
7.1.130.0580.00915.89
7.1.120.0620.01115.91
7.1.110.0490.01216.09
7.1.100.0510.01016.12
7.1.90.0480.00916.07
7.1.80.0490.00716.13
7.1.70.0400.01215.88
7.1.60.0260.01121.87
7.1.50.0240.01121.77
7.1.40.0250.01021.72
7.1.30.0300.00921.77
7.1.20.0190.01221.75
7.1.10.0200.00815.73
7.1.00.0160.00815.77
7.0.330.0190.00715.81
7.0.320.0290.00815.98
7.0.310.0700.01015.56
7.0.300.0710.00915.52
7.0.290.0700.01015.60
7.0.280.0580.01015.54
7.0.270.0580.00915.70
7.0.260.0540.00815.71
7.0.250.0490.01015.94
7.0.240.0450.00915.83
7.0.230.0580.00815.91
7.0.220.0340.01115.87
7.0.210.0340.00815.59
7.0.200.0150.01215.68
7.0.190.0140.01215.63
7.0.180.0220.01215.56
7.0.170.0170.01115.54
7.0.160.0210.00715.48
7.0.150.0180.00915.52
7.0.140.0220.00915.59
7.0.130.0220.00715.56
7.0.120.0150.01015.56
7.0.110.0200.00815.63
7.0.100.0190.00915.58
7.0.90.0170.01015.57
7.0.80.0180.01115.64
7.0.70.0190.00815.53
7.0.60.0140.00915.49
7.0.50.0160.00815.60
7.0.40.0200.00815.54
7.0.30.0520.01015.60
7.0.20.0210.01015.61
7.0.10.0240.00915.55
7.0.00.0220.00915.52
5.6.400.0170.01416.19
5.6.390.0160.01216.09
5.6.380.0160.01216.09
5.6.370.0150.01216.01
5.6.360.0200.00716.14
5.6.350.0170.01216.24
5.6.340.0160.01316.25
5.6.330.0170.01216.16
5.6.320.0160.01416.23
5.6.310.0180.01516.18
5.6.300.0160.02317.01
5.6.290.0160.02317.05
5.6.280.0160.02117.15
5.6.270.0140.02317.14
5.6.260.0160.02217.17
5.6.250.0140.02117.13
5.6.240.0120.02617.14
5.6.230.0160.02117.15
5.6.220.0120.02517.11
5.6.210.0140.02117.14
5.6.200.0150.02117.17
5.6.190.0150.02317.17
5.6.180.0120.02417.13
5.6.170.0140.02417.15
5.6.160.0110.02617.04
5.6.150.0130.02617.12
5.6.140.0170.02117.14
5.6.130.0130.02317.11
5.6.120.0140.02417.09
5.6.110.0150.02217.10
5.6.100.0160.02417.15
5.6.90.0140.02317.17
5.6.80.0160.02016.99
5.6.70.0120.02216.93
5.6.60.0110.02317.00
5.6.50.0120.02316.96
5.6.40.0130.02216.92
5.6.30.0130.02016.93
5.6.20.0140.02016.94
5.6.10.0130.02116.89
5.6.00.0130.02016.93
5.5.380.0150.02115.92
5.5.370.0170.02116.07
5.5.360.0150.02115.98
5.5.350.0130.02316.02
5.5.340.0140.02316.14
5.5.330.0130.02016.08
5.5.320.0150.02116.14
5.5.310.0170.02016.04
5.5.300.0140.02216.08
5.5.290.0140.02216.11
5.5.280.0130.02216.11
5.5.270.0140.02316.05
5.5.260.0150.02516.08
5.5.250.0160.02016.01
5.5.240.0120.02215.93
5.5.230.0130.02115.89
5.5.220.0150.02115.89
5.5.210.0130.02215.85
5.5.200.0130.02015.90
5.5.190.0140.01815.89
5.5.180.0130.02015.87
5.5.170.0140.01115.95
5.5.160.0130.01915.82
5.5.150.0130.02115.83
5.5.140.0120.02115.84
5.5.130.0130.02015.90
5.5.120.0130.02015.87
5.5.110.0130.02215.93
5.5.100.0100.02315.81
5.5.90.0130.02015.78
5.5.80.0120.02115.80
5.5.70.0120.02015.77
5.5.60.0140.01915.82
5.5.50.0140.02015.87
5.5.40.0120.02115.79
5.5.30.0130.02115.78
5.5.20.0120.02215.88
5.5.10.0120.02215.74
5.5.00.0130.01915.78

preferences:
84.74 ms | 454 KiB | 5 Q