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; } function getName() { return $this->name; } function setName($name) { $this->name = $name; } } for( $x=0;$x<10000;$x++){ $o = new MyArrayObject( 'Adam', 35 ); $name = $o->getName(); $o->setName($name . "2"); $s[] = $o; unset($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.3.60.0070.01018.32
8.3.50.0070.02018.14
8.3.40.0140.01020.04
8.3.30.0140.00720.04
8.3.20.0070.00324.18
8.3.10.0000.01024.66
8.3.00.0040.00726.16
8.2.180.0030.01925.92
8.2.170.0070.01120.22
8.2.160.0100.01022.96
8.2.150.0100.00025.66
8.2.140.0000.00824.66
8.2.130.0090.00026.16
8.2.120.0030.00626.35
8.2.110.0040.00822.29
8.2.100.0070.00719.16
8.2.90.0030.00719.22
8.2.80.0000.01020.29
8.2.70.0030.00719.00
8.2.60.0070.00419.40
8.2.50.0050.00519.00
8.2.40.0060.00619.53
8.2.30.0030.00719.62
8.2.20.0000.00919.59
8.2.10.0050.00520.66
8.2.00.0000.01020.71
8.1.280.0030.02025.92
8.1.270.0030.00726.24
8.1.260.0000.01028.09
8.1.250.0070.00428.09
8.1.240.0040.00725.91
8.1.230.0040.01119.70
8.1.220.0070.00319.91
8.1.210.0070.00319.36
8.1.200.0040.00719.35
8.1.190.0000.01119.23
8.1.180.0000.01019.35
8.1.170.0000.01020.72
8.1.160.0030.00620.74
8.1.150.0070.00320.74
8.1.140.0090.00020.77
8.1.130.0090.00021.98
8.1.120.0000.01019.21
8.1.110.0030.00719.24
8.1.100.0000.01019.27
8.1.90.0100.00019.25
8.1.80.0030.00719.34
8.1.70.0000.00919.13
8.1.60.0050.00519.46
8.1.50.0030.00719.45
8.1.40.0070.00319.42
8.1.30.0000.01019.55
8.1.20.0040.00719.49
8.1.10.0070.00419.51
8.1.00.0030.00919.29
8.0.300.0070.00418.77
8.0.290.0030.00718.50
8.0.280.0030.00620.14
8.0.270.0060.00319.78
8.0.260.0040.00421.95
8.0.250.0030.00618.72
8.0.240.0030.00718.62
8.0.230.0000.00918.54
8.0.220.0030.00618.59
8.0.210.0100.00018.58
8.0.200.0090.00018.57
8.0.190.0030.00718.61
8.0.180.0070.00318.68
8.0.170.0000.01118.66
8.0.160.0070.00318.63
8.0.150.0000.01018.57
8.0.140.0040.00718.62
8.0.130.0060.00315.16
8.0.120.0000.01118.66
8.0.110.0030.00718.45
8.0.100.0000.01018.63
8.0.90.0030.00718.61
8.0.80.0110.00818.52
8.0.70.0070.00318.45
8.0.60.0050.00518.44
8.0.50.0030.00718.56
8.0.30.0070.01418.73
8.0.20.0210.00718.75
8.0.10.0030.00718.66
8.0.00.0150.01118.65
7.4.330.0030.00315.55
7.4.320.0000.00818.10
7.4.300.0060.00318.28
7.4.290.0000.01118.19
7.4.280.0080.00318.20
7.4.270.0060.00618.10
7.4.260.0040.00415.00
7.4.250.0100.00018.23
7.4.240.0040.00718.30
7.4.230.0000.01018.41
7.4.220.0050.00518.23
7.4.210.0110.01218.34
7.4.200.0030.00618.39
7.4.130.0120.01518.40
7.4.120.0090.01218.13
7.4.110.0130.01018.35
7.4.100.0130.01018.30
7.4.90.0100.01018.25
7.4.80.0130.01018.05
7.4.70.0110.01118.36
7.4.60.0140.00718.30
7.4.50.0100.01418.32
7.4.40.0070.01418.25
7.4.30.0130.01018.30
7.4.20.0120.01218.18
7.4.10.0170.00718.21
7.4.00.0080.01517.90
7.3.330.0030.00718.01
7.3.320.0000.00915.10
7.3.310.0030.00618.04
7.3.300.0030.00718.01
7.3.290.0090.01317.97
7.3.280.0090.02017.94
7.3.260.0200.01318.14
7.3.230.0080.01318.31
7.3.210.0110.01118.28
7.3.200.0120.00918.25
7.3.190.0130.01017.95
7.3.180.0070.01418.13
7.3.170.0110.01418.05
7.3.160.0150.00718.25
7.3.150.0090.01317.95
7.3.140.0130.00918.14
7.3.130.0130.00918.03
7.3.120.0090.01518.02
7.3.110.0070.01418.08
7.3.100.0110.01118.05
7.3.90.0070.01417.93
7.3.80.0090.01218.25
7.3.70.0130.01018.05
7.3.60.0200.01018.09
7.3.50.0110.01118.19
7.3.40.0120.00917.98
7.3.30.0090.01517.94
7.3.20.0100.01318.15
7.3.10.0090.01318.20
7.3.00.0150.00918.09
7.2.330.0160.00618.54
7.2.320.0150.00818.58
7.2.310.0150.02018.60
7.2.300.0040.01918.48
7.2.290.0140.00918.73
7.2.280.0130.01018.48
7.2.270.0160.00718.35
7.2.260.0130.01018.67
7.2.250.0100.01318.50
7.2.240.0100.01418.48
7.2.230.0060.01618.63
7.2.220.0100.01318.50
7.2.210.0060.01818.53
7.2.200.0170.00618.51
7.2.190.0100.02218.61
7.2.180.0140.01018.58
7.2.170.0190.00318.54
7.2.160.0060.01618.41
7.2.150.0240.00618.66
7.2.140.0120.01218.61
7.2.130.0070.01718.47
7.2.120.0100.01318.71
7.2.110.0040.02118.49
7.2.100.0060.01818.54
7.2.90.0200.00318.64
7.2.80.0100.01618.75
7.2.70.0130.01318.74
7.2.60.0120.01618.61
7.2.50.0220.00318.65
7.2.40.0170.00718.58
7.2.30.0140.01018.64
7.2.20.0120.01218.68
7.2.10.0110.01418.54
7.2.00.0110.01418.57

preferences:
30.98 ms | 401 KiB | 5 Q