3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar; public $baz; public $taz; } // please note that this API has a signature of `object $object` - any object allowed. function unsetProperties($object) { // we ignore inheritance and private properties for simplicity return array_diff( array_map( function (\ReflectionProperty $p) : string { return $p->getName(); }, (new ReflectionClass($object))->getProperties() ), array_keys((array) $object) ); } var_dump(unsetProperties(new Foo)); $foo = new Foo; unset($foo->baz); var_dump(unsetProperties($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.70.0070.00716.58
8.3.60.0060.01118.30
8.3.50.0110.00921.87
8.3.40.0160.00618.71
8.3.30.0110.00418.51
8.3.20.0040.01120.09
8.3.10.0050.00320.39
8.3.00.0030.01323.66
8.2.180.0120.00325.92
8.2.170.0150.00018.91
8.2.160.0070.01022.96
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0000.00926.16
8.2.120.0040.00421.18
8.2.110.0060.00321.04
8.2.100.0040.00817.78
8.2.90.0040.00418.22
8.2.80.0040.00420.55
8.2.70.0040.00417.93
8.2.60.0050.00318.34
8.2.50.0060.00318.10
8.2.40.0030.00520.45
8.2.30.0040.00420.45
8.2.20.0040.00418.01
8.2.10.0050.00218.13
8.2.00.0050.00518.22
8.1.280.0100.00625.92
8.1.270.0000.00723.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0040.01222.19
8.1.230.0040.00820.92
8.1.220.0050.00317.77
8.1.210.0130.00318.77
8.1.200.0030.00717.48
8.1.190.0030.00517.35
8.1.180.0040.00418.10
8.1.170.0030.00518.68
8.1.160.0040.00419.02
8.1.150.0070.00020.27
8.1.140.0080.00019.60
8.1.130.0070.00020.84
8.1.120.0050.00317.54
8.1.110.0050.00317.45
8.1.100.0000.00717.44
8.1.90.0000.00717.38
8.1.80.0030.00317.40
8.1.70.0030.00317.42
8.1.60.0060.00317.49
8.1.50.0060.00317.44
8.1.40.0060.00317.55
8.1.30.0000.00917.66
8.1.20.0040.00417.50
8.1.10.0090.00017.47
8.1.00.0000.00817.54
8.0.300.0000.00720.04
8.0.290.0040.00416.59
8.0.280.0030.00518.46
8.0.270.0000.00816.89
8.0.260.0000.00717.28
8.0.250.0040.00416.95
8.0.240.0080.00017.02
8.0.230.0070.00017.00
8.0.220.0030.00416.82
8.0.210.0030.00316.86
8.0.200.0040.00416.96
8.0.190.0000.00717.02
8.0.180.0000.00816.96
8.0.170.0000.00816.97
8.0.160.0000.00717.01
8.0.150.0040.00416.89
8.0.140.0030.00317.01
8.0.130.0000.00513.48
8.0.120.0030.00516.95
8.0.110.0040.00416.83
8.0.100.0000.00716.83
8.0.90.0050.00216.89
8.0.80.0030.01317.00
8.0.70.0070.00016.95
8.0.60.0050.00316.93
8.0.50.0040.00416.82
8.0.30.0090.00917.12
8.0.20.0120.00817.40
8.0.10.0070.00016.93
8.0.00.0140.00716.93
7.4.330.0000.00615.55
7.4.320.0070.00016.41
7.4.300.0030.00316.53
7.4.290.0030.00616.46
7.4.280.0030.00316.59
7.4.270.0070.00016.52
7.4.260.0050.00316.49
7.4.250.0000.00716.46
7.4.240.0000.00716.51
7.4.230.0000.00716.52
7.4.220.0040.01716.54
7.4.210.0070.01116.65
7.4.200.0030.00316.64
7.4.160.0090.00816.35
7.4.150.0110.01417.40
7.4.140.0050.01617.86
7.4.130.0150.00816.53
7.4.120.0090.01416.61
7.4.110.0060.01016.59
7.4.100.0090.01216.44
7.4.90.0130.01916.49
7.4.80.0140.00419.39
7.4.70.0060.01416.57
7.4.60.0110.01116.51
7.4.50.0060.00316.31
7.4.40.0150.00916.41
7.4.30.0060.01016.52
7.4.00.0080.00814.92
7.3.330.0000.00513.33
7.3.320.0060.00013.26
7.3.310.0000.00716.30
7.3.300.0050.00216.32
7.3.290.0070.00716.31
7.3.280.0070.01116.29
7.3.270.0150.00417.40
7.3.260.0090.00916.36
7.3.250.0100.00916.39
7.3.240.0080.01116.41
7.3.230.0200.01216.39
7.3.210.0070.01016.35
7.3.200.0160.00016.36
7.3.190.0120.00616.42
7.3.180.0090.00816.43
7.3.170.0060.01116.42
7.3.160.0120.00416.28
7.3.120.0160.00014.83
7.3.110.0080.00814.78
7.3.100.0000.01414.83
7.3.90.0000.01314.86
7.3.80.0040.01414.91
7.3.70.0070.00714.99
7.3.60.0070.00714.88
7.3.50.0070.00714.70
7.3.40.0030.00514.34
7.3.30.0070.00714.83
7.3.20.0000.01016.66
7.3.10.0080.00416.45
7.3.00.0030.01316.47
7.2.330.0040.01516.74
7.2.320.0070.01116.53
7.2.310.0030.01616.36
7.2.300.0130.00616.69
7.2.290.0100.01316.81
7.2.250.0040.01114.82
7.2.240.0100.01015.18
7.2.230.0120.00615.03
7.2.220.0060.00615.16
7.2.210.0070.00715.11
7.2.200.0040.00814.75
7.2.190.0060.00915.01
7.2.180.0070.00715.07
7.2.170.0100.00615.04
7.2.60.0030.01017.01
7.2.00.0000.00919.42
7.1.330.0070.01015.98
7.1.320.0070.00715.75
7.1.310.0090.00615.66
7.1.300.0040.00815.49
7.1.290.0030.01015.82
7.1.280.0070.00715.60
7.1.270.0030.01015.49
7.1.260.0030.01015.72
7.1.200.0080.00315.86
7.1.100.0030.00617.75
7.1.70.0000.01117.12
7.1.60.0000.01016.98
7.1.50.0120.00616.87
7.1.20.0230.06338.29
7.1.10.1100.09720.34
7.1.00.1600.06320.57
7.0.200.0070.00716.53
7.0.160.1230.07020.12
7.0.150.0070.07320.19
7.0.140.1270.06720.02
7.0.130.2370.06320.05
7.0.120.1630.05720.03
7.0.110.0170.05721.80
7.0.100.0070.06019.98
7.0.90.0900.05320.00
7.0.80.0070.06320.00
7.0.70.1030.05720.07
7.0.60.1530.06720.04
7.0.50.1070.08020.18
7.0.40.0030.07321.83
7.0.30.1130.05720.14
7.0.20.0100.05721.69
7.0.10.1000.06720.08
7.0.00.1000.06020.12

preferences:
46.68 ms | 401 KiB | 5 Q