3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Object { function resetObject() { $blankInstance = new static; //requires PHP 5.3+ for older versions you could do $blankInstance = new get_class($this); $reflBlankInstance = new \ReflectionClass($blankInstance); foreach ($reflBlankInstance->getProperties() as $prop) { $prop->setAccessible(true); $this->{$prop->name} = $prop->getValue($blankInstance); } } }

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.01416.38
8.3.50.0150.00017.93
8.3.40.0080.00818.74
8.3.30.0070.00718.54
8.3.20.0050.00321.88
8.3.10.0000.00721.76
8.3.00.0080.00019.68
8.2.180.0090.00618.16
8.2.170.0060.00922.96
8.2.160.0070.00719.34
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00320.55
8.2.120.0040.00426.35
8.2.110.0120.00622.24
8.2.100.0040.00817.72
8.2.90.0090.00017.90
8.2.80.0090.00017.97
8.2.70.0060.00317.23
8.2.60.0000.00717.80
8.2.50.0000.00818.10
8.2.40.0080.00420.60
8.2.30.0020.00519.02
8.2.20.0000.00817.81
8.2.10.0090.00017.84
8.2.00.0000.00717.90
8.1.280.0170.00025.92
8.1.270.0050.00320.48
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0050.00322.19
8.1.230.0040.00720.86
8.1.220.0000.00917.74
8.1.210.0030.00518.77
8.1.200.0040.00417.23
8.1.190.0040.00417.22
8.1.180.0050.00218.10
8.1.170.0000.00818.59
8.1.160.0000.00818.99
8.1.150.0040.00418.86
8.1.140.0040.00419.39
8.1.130.0030.00318.66
8.1.120.0030.00517.36
8.1.110.0030.00617.23
8.1.100.0030.00317.32
8.1.90.0000.00917.21
8.1.80.0050.00317.21
8.1.70.0030.00317.32
8.1.60.0000.00817.40
8.1.50.0000.00717.34
8.1.40.0040.00417.30
8.1.30.0040.00417.38
8.1.20.0040.00417.39
8.1.10.0040.00417.37
8.1.00.0040.00417.32
8.0.300.0000.00719.78
8.0.290.0040.00416.63
8.0.280.0070.00018.23
8.0.270.0000.00717.13
8.0.260.0000.00817.03
8.0.250.0030.00316.93
8.0.240.0040.00416.88
8.0.230.0070.00416.77
8.0.220.0040.00416.84
8.0.210.0070.00016.73
8.0.200.0040.00416.86
8.0.190.0030.00616.75
8.0.180.0040.00416.89
8.0.170.0070.00416.84
8.0.160.0030.00316.74
8.0.150.0000.00716.74
8.0.140.0000.00816.73
8.0.130.0000.00713.22
8.0.120.0040.00416.68
8.0.110.0030.00516.87
8.0.100.0050.00316.79
8.0.90.0000.00716.85
8.0.80.0000.01716.83
8.0.70.0080.00016.87
8.0.60.0030.00316.81
8.0.50.0000.00716.81
8.0.30.0120.00716.86
8.0.20.0120.00717.40
8.0.10.0040.00417.00
8.0.00.0100.01316.55
7.4.330.0000.00515.55
7.4.320.0070.00016.32
7.4.300.0000.00616.41
7.4.290.0040.00416.51
7.4.280.0040.00416.30
7.4.270.0030.00316.50
7.4.260.0030.00616.40
7.4.250.0000.00716.42
7.4.240.0000.00716.30
7.4.230.0000.00716.16
7.4.220.0100.01216.41
7.4.210.0100.00716.39
7.4.200.0030.00316.56
7.4.160.0070.00816.47
7.4.150.0100.00717.40
7.4.140.0090.00917.86
7.4.130.0140.01116.36
7.4.120.0090.01016.41
7.4.110.0100.01016.36
7.4.100.0140.00716.43
7.4.90.0190.00316.46
7.4.80.0100.00919.39
7.4.70.0000.01616.50
7.4.60.0040.01216.25
7.4.50.0120.00316.29
7.4.40.0070.01316.32
7.4.30.0130.00316.44
7.4.00.0060.01214.40
7.3.330.0050.00013.12
7.3.320.0000.00613.18
7.3.310.0000.00716.21
7.3.300.0000.00616.21
7.3.290.0080.00616.16
7.3.280.0100.00616.16
7.3.270.0120.00417.40
7.3.260.0110.00716.22
7.3.250.0130.00716.29
7.3.240.0160.00316.27
7.3.230.0130.00416.09
7.3.210.0070.01016.11
7.3.200.0050.01016.17
7.3.190.0040.01116.43
7.3.180.0070.01316.23
7.3.170.0130.00316.24
7.3.160.0100.01016.44
7.2.330.0100.01016.52
7.2.320.0090.00916.50
7.2.310.0150.00616.40
7.2.300.0120.00616.55
7.2.290.0100.00816.22
7.2.60.0040.00816.68
7.2.00.0060.00619.28
7.1.200.0100.00515.31
7.1.100.0060.00917.86
7.1.70.0070.00316.84
7.1.60.0730.02032.92
7.1.50.0930.01732.76
7.1.40.1630.02032.41
7.1.30.1400.02032.44
7.1.20.0670.02332.71
7.1.10.0970.01014.42
7.1.00.0900.01014.59
7.0.200.0830.01314.41
7.0.190.1130.01314.50
7.0.180.1370.01014.14
7.0.170.0830.01314.15
7.0.160.1000.01314.04
7.0.150.1000.01314.13
7.0.140.0770.01314.22
7.0.130.0930.01314.44
7.0.120.0630.01314.42
7.0.110.1000.01314.39
7.0.100.0770.01314.14
7.0.90.0970.01014.14
7.0.80.0670.01314.43
7.0.70.0770.00714.09
7.0.60.0670.00313.93
7.0.50.1030.01014.33
7.0.40.0800.01014.20
7.0.30.0730.01314.35
7.0.20.0870.01314.53
7.0.10.0870.00714.13
7.0.00.0900.00714.29

preferences:
54.03 ms | 400 KiB | 5 Q