3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public $pub = 0; protected $prot = 1; private $priv = 2; } $obj = (object) (array) new MyClass(); $obj_vars = get_object_vars( $obj ); foreach ( $obj_vars as $name => $value ) { $name = trim( $name, "\0*" ); $obj->$name = $value; } print_r( $obj );

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.4.20.0090.00019.57
8.4.10.0000.00824.02
8.3.150.0080.00017.12
8.3.140.0120.00316.57
8.3.130.0060.00318.59
8.3.120.0040.00420.50
8.3.110.0100.00616.62
8.3.100.0120.00316.49
8.3.90.0080.01226.77
8.3.80.0030.00616.38
8.3.70.0150.00616.58
8.3.60.0070.01116.32
8.3.50.0110.00420.15
8.3.40.0070.00720.04
8.3.30.0130.00618.71
8.3.20.0040.00424.18
8.3.10.0030.00524.66
8.3.00.0050.00326.16
8.2.260.0030.00520.55
8.2.250.0030.00618.33
8.2.240.0070.00317.26
8.2.230.0100.00020.94
8.2.220.0030.00537.54
8.2.210.0090.00626.77
8.2.200.0040.00416.63
8.2.190.0180.00016.58
8.2.180.0140.00725.92
8.2.170.0130.00618.96
8.2.160.0070.00722.96
8.2.150.0000.00725.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00726.16
8.2.110.0030.00719.30
8.2.100.0110.00417.78
8.2.90.0000.00719.45
8.2.80.0040.00418.99
8.2.70.0060.00317.93
8.2.60.0030.00517.80
8.2.50.0080.00018.10
8.2.40.0040.00418.16
8.2.30.0050.00318.01
8.2.20.0040.00421.02
8.2.10.0000.00718.05
8.2.00.0040.00419.28
8.1.310.0070.00016.67
8.1.300.0030.00620.16
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0070.00024.66
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00621.98
8.1.230.0110.00020.96
8.1.220.0040.00417.79
8.1.210.0000.00818.85
8.1.200.0060.00317.35
8.1.190.0030.00617.35
8.1.180.0000.00818.10
8.1.170.0100.00018.66
8.1.160.0040.00418.90
8.1.150.0080.00318.55
8.1.140.0040.00417.46
8.1.130.0000.00717.38
8.1.120.0160.00417.41
8.1.110.0140.00517.39
8.1.100.0140.00417.52
8.1.90.0120.00417.48
8.1.80.0200.00017.52
8.1.70.0150.00217.39
8.1.60.0130.00717.63
8.1.50.0160.00417.60
8.1.40.0100.01017.60
8.1.30.0150.00417.71
8.1.20.0170.00217.55
8.1.10.0110.00717.48
8.1.00.0150.00417.44
8.0.300.0070.00019.85
8.0.290.0030.00516.75
8.0.280.0030.00318.45
8.0.270.0020.00516.84
8.0.260.0030.00316.84
8.0.250.0060.01116.73
8.0.240.0090.00716.83
8.0.230.0180.00016.79
8.0.220.0110.00516.81
8.0.210.0180.00016.68
8.0.200.0090.00616.88
8.0.190.0110.00416.80
8.0.180.0120.00616.84
8.0.170.0160.00016.85
8.0.160.0160.00316.89
8.0.150.0110.00416.72
8.0.140.0120.00216.69
8.0.130.0110.00416.87
8.0.120.0090.00916.69
8.0.110.0100.00516.71
8.0.100.0090.00916.80
8.0.90.0070.00716.81
8.0.80.0140.00516.85
8.0.70.0100.00516.71
8.0.60.0140.00316.83
8.0.50.0150.00016.82
8.0.30.0120.00316.81
8.0.20.0080.00816.87
8.0.10.0070.00716.93
8.0.00.0060.00917.05
7.4.330.0120.00315.55
7.4.320.0180.00316.47
7.4.300.0170.00216.51
7.4.290.0130.00516.41
7.4.280.0120.00718.14
7.4.270.0160.00416.34
7.4.260.0110.00716.53
7.4.250.0100.00016.50
7.4.240.0060.00516.26
7.4.230.0080.00418.18
7.4.220.0050.00516.47
7.4.210.0090.00316.52
7.4.200.0100.00016.43
7.4.190.0000.01216.52
7.4.180.0080.00616.24
7.4.160.0060.00616.51
7.4.150.0110.00316.42
7.4.140.0080.00416.24
7.4.130.0100.00218.18
7.4.120.0090.00515.81
7.4.110.0140.00016.39
7.4.100.0100.00316.21
7.4.90.0040.00816.46
7.4.80.0020.01016.41
7.4.70.0000.01216.37
7.4.60.0050.00516.35
7.4.50.0070.00716.32
7.4.40.0080.00616.38
7.4.30.0060.00816.39
7.4.20.0100.00316.40
7.4.10.0060.00716.28
7.4.00.0070.00516.36
7.3.330.0080.00816.15
7.3.320.0130.00716.27
7.3.310.0190.00016.29
7.3.300.0070.01116.31
7.3.290.0130.00516.14
7.3.280.0130.00416.30
7.3.270.0170.00016.08
7.3.260.0090.00816.08
7.3.250.0110.00716.13
7.3.240.0160.00216.21
7.3.230.0120.00416.11
7.3.220.0120.00416.20
7.3.210.0160.00016.03
7.3.200.0100.00716.04
7.3.190.0130.00316.21
7.3.180.0090.00916.05
7.3.170.0140.00416.08
7.3.160.0130.00416.09
7.3.150.0160.00016.19
7.3.140.0110.00616.04
7.3.130.0140.00416.23
7.3.120.0120.00416.03
7.3.110.0170.00016.10
7.3.100.0070.01116.08
7.3.90.0130.00316.39
7.3.80.0140.00316.23
7.3.70.0130.00416.16
7.3.60.0110.00516.42
7.3.50.0120.00316.25
7.3.40.0140.00016.41
7.3.30.0100.00716.31
7.3.20.0150.00618.23
7.3.10.0050.01118.16
7.3.00.0120.00618.12
7.2.340.0110.00516.45
7.2.330.0170.00016.43
7.2.320.0110.00616.41
7.2.310.0090.00616.44
7.2.300.0120.00316.43
7.2.290.0070.00716.44
7.2.280.0050.01016.31
7.2.270.0100.00516.29
7.2.260.0080.00816.28
7.2.250.0100.00316.29
7.2.240.0070.00716.23
7.2.230.0120.00216.29
7.2.220.0150.00016.44
7.2.210.0080.00816.44
7.2.200.0130.00416.49
7.2.190.0160.00216.38
7.2.180.0060.01116.38
7.2.170.0110.00316.46
7.2.160.0030.01016.63
7.2.150.0150.00018.28
7.2.140.0110.00418.36
7.2.130.0090.00918.54
7.2.120.0090.00618.45
7.2.110.0200.00718.36
7.2.100.0050.01018.50
7.2.90.0100.00518.27
7.2.80.0150.00018.31
7.2.70.0140.00018.30
7.2.60.0080.00818.38
7.2.50.0160.00018.50
7.2.40.0120.00518.50
7.2.30.0110.00718.31
7.2.20.0120.00418.57
7.2.10.0100.00718.57
7.2.00.0090.00818.57
7.1.330.0150.00017.31
7.1.320.0100.00317.28
7.1.310.0140.00017.13
7.1.300.0090.00417.24
7.1.290.0100.00517.19
7.1.280.0120.00217.11
7.1.270.0100.00517.21
7.1.260.0150.00017.31
7.1.250.0100.00317.10
7.1.240.0100.00317.15
7.1.230.0180.00017.26
7.1.220.0040.00917.29
7.1.210.0070.00717.39
7.1.200.0120.00217.34
7.1.190.0070.00717.24
7.1.180.0120.00517.23
7.1.170.0070.00717.24
7.1.160.0100.00317.28
7.1.150.0110.00417.14
7.1.140.0110.00417.18
7.1.130.0120.00417.19
7.1.120.0040.01117.28
7.1.110.0120.00517.20
7.1.100.0130.00317.19
7.1.90.0120.00317.29
7.1.80.0140.00017.27
7.1.70.0140.00017.13
7.1.60.0070.00717.30
7.1.50.0130.00017.25
7.1.40.0060.00617.33
7.1.30.0080.00817.17
7.1.20.0100.00317.25
7.1.10.0130.00317.11
7.1.00.0130.00317.13
7.0.330.0090.00416.92
7.0.320.0100.00316.78
7.0.310.0140.00016.71
7.0.300.0130.00016.87
7.0.290.0100.00516.79
7.0.280.0070.00716.73
7.0.270.0140.00016.91
7.0.260.0110.00416.78
7.0.250.0120.00317.09
7.0.240.0070.00716.98
7.0.230.0100.00317.05
7.0.220.0110.00416.93
7.0.210.0060.00617.11
7.0.200.0090.00417.04
7.0.190.0110.00416.91
7.0.180.0070.00716.92
7.0.170.0070.00716.99
7.0.160.0100.00516.98
7.0.150.0080.00516.84
7.0.140.0120.00316.91
7.0.130.0150.00016.84
7.0.120.0070.00716.96
7.0.110.0000.01516.88
7.0.100.0130.00216.94
7.0.90.0170.00016.88
7.0.80.0080.00816.68
7.0.70.0050.00916.87
7.0.60.0090.00616.76
7.0.50.0140.00016.85
7.0.40.0080.00616.80
7.0.30.0090.00517.04
7.0.20.0100.00316.75
7.0.10.0100.00316.85
7.0.00.0110.00416.93
5.6.400.0090.00515.89
5.6.390.0070.00715.90
5.6.380.0140.00015.92
5.6.370.0090.00615.89
5.6.360.0100.00315.71
5.6.350.0080.00815.91
5.6.340.0110.00415.91
5.6.330.0100.00315.73
5.6.320.0140.00015.71
5.6.310.0120.00315.89
5.6.300.0130.00015.65
5.6.290.0100.00315.83
5.6.280.0060.00615.79
5.6.270.0070.00715.73
5.6.260.0130.00015.73
5.6.250.0100.00315.85
5.6.240.0080.00615.73
5.6.230.0130.00015.92
5.6.220.0100.00315.92
5.6.210.0060.00615.83
5.6.200.0060.00616.03
5.6.190.0090.00315.96
5.6.180.0060.00615.91
5.6.170.0090.00615.93
5.6.160.0030.01015.82
5.6.150.0100.00516.00
5.6.140.0060.00615.91
5.6.130.0110.00315.76
5.6.120.0090.00415.98
5.6.110.0120.00215.79
5.6.100.0100.00315.84
5.6.90.0130.00015.89
5.6.80.0090.00415.77
5.6.70.0090.00316.03
5.6.60.0060.00816.00
5.6.50.0070.00715.74
5.6.40.0110.00515.71
5.6.30.0120.00215.70
5.6.20.0090.00315.66
5.6.10.0130.00015.63
5.6.00.0120.00015.62
5.5.380.0110.00415.87
5.5.370.0150.00016.06
5.5.360.0110.00415.80
5.5.350.0100.00315.69
5.5.340.0110.00215.62
5.5.330.0080.00515.74
5.5.320.0090.00615.88
5.5.310.0090.00315.66
5.5.300.0040.01115.88
5.5.290.0100.00315.77
5.5.280.0090.00515.61
5.5.270.0070.00715.62
5.5.260.0110.00315.71
5.5.250.0070.00715.88
5.5.240.0080.00616.00
5.5.230.0090.00315.92
5.5.220.0030.00915.92
5.5.210.0120.00015.91
5.5.200.0060.00615.59
5.5.190.0050.01015.56
5.5.180.0100.00315.66
5.5.170.0080.00815.68
5.5.160.0130.00315.59
5.5.150.0170.00015.55
5.5.140.0060.00915.55
5.5.130.0110.00515.61
5.5.120.0130.00515.63
5.5.110.0080.00615.55
5.5.100.0110.00315.77
5.5.90.0090.00915.75
5.5.80.0150.00015.85
5.5.70.0040.01115.89
5.5.60.0040.01215.76
5.5.50.0120.00315.77
5.5.40.0130.00315.79
5.5.30.0180.00015.88
5.5.20.0150.00015.78
5.5.10.0110.00515.82
5.5.00.0120.00315.86
5.4.450.0110.00015.55
5.4.440.0040.00915.55
5.4.430.0080.00415.55
5.4.420.0100.00315.55
5.4.410.0080.00315.55
5.4.400.0090.00315.55
5.4.390.0060.00615.55
5.4.380.0090.00415.55
5.4.370.0130.00015.55
5.4.360.0130.00015.55
5.4.350.0100.00415.55
5.4.340.0070.00715.55
5.4.330.0060.00615.55
5.4.320.0090.00515.55
5.4.310.0130.00015.55
5.4.300.0130.00015.55
5.4.290.0130.00015.55
5.4.280.0090.00315.55
5.4.270.0000.01415.55
5.4.260.0070.00415.55
5.4.250.0090.00615.55
5.4.240.0050.00715.55
5.4.230.0130.00015.55
5.4.220.0150.00015.55
5.4.210.0100.00315.55
5.4.200.0120.00015.55
5.4.190.0080.00615.55
5.4.180.0130.00015.55
5.4.170.0130.00015.55
5.4.160.0120.00015.55
5.4.150.0120.00015.55
5.4.140.0120.00015.55
5.4.130.0070.00515.55
5.4.120.0070.00615.55
5.4.110.0110.00015.55
5.4.100.0080.00415.55
5.4.90.0080.00415.55
5.4.80.0070.00615.55
5.4.70.0100.00315.55
5.4.60.0090.00315.55
5.4.50.0080.00515.55
5.4.40.0060.00615.55
5.4.30.0060.00715.55
5.4.20.0060.00615.55
5.4.10.0000.01015.55
5.4.00.0060.00515.55
5.3.290.0040.00815.55
5.3.280.0080.00415.55
5.3.270.0080.00415.55
5.3.260.0130.00015.55
5.3.250.0080.00415.55
5.3.240.0030.01015.55
5.3.230.0040.00815.55
5.3.220.0100.00315.55
5.3.210.0070.00415.55
5.3.200.0090.00315.55
5.3.190.0110.00215.55
5.3.180.0080.00415.55
5.3.170.0120.00015.55
5.3.160.0100.00015.55
5.3.150.0120.00015.55
5.3.140.0000.01315.55
5.3.130.0080.00315.55
5.3.120.0050.00515.55
5.3.110.0090.00515.55
5.3.100.0050.00515.55
5.3.90.0090.00315.55
5.3.80.0000.01115.55
5.3.70.0090.00315.55
5.3.60.0100.00215.55
5.3.50.0070.00315.55
5.3.40.0070.00415.55
5.3.30.0070.00315.55
5.3.20.0080.00315.55
5.3.10.0050.00515.55
5.3.00.0060.00615.55
5.2.170.0030.00615.55
5.2.160.0100.00015.55
5.2.150.0060.00415.55
5.2.140.0000.00915.55
5.2.130.0040.00415.55
5.2.120.0090.00015.55
5.2.110.0040.00415.55
5.2.100.0090.00015.55
5.2.90.0080.00015.55
5.2.80.0070.00215.55
5.2.70.0050.00515.55
5.2.60.0100.00015.55
5.2.50.0000.01015.55
5.2.40.0050.00515.55
5.2.30.0040.00415.55
5.2.20.0060.00315.55
5.2.10.0050.00515.55
5.2.00.0040.00415.55
5.1.60.0050.00215.55
5.1.50.0060.00315.55
5.1.40.0080.00015.55
5.1.30.0040.00415.55
5.1.20.0040.00415.55
5.1.10.0040.00415.55
5.1.00.0080.00015.55
5.0.50.0060.00015.55
5.0.40.0070.00015.55
5.0.30.0000.00615.55
5.0.20.0040.00415.55
5.0.10.0000.00615.55
5.0.00.0040.00215.55
4.4.90.0030.00115.55
4.4.80.0020.00215.55
4.4.70.0040.00015.55
4.4.60.0000.00415.55
4.4.50.0000.00315.55
4.4.40.0000.00415.55
4.4.30.0000.00315.55
4.4.20.0040.00015.55
4.4.10.0000.00415.55
4.4.00.0020.00215.55
4.3.110.0040.00015.55
4.3.100.0000.00315.55
4.3.90.0000.00415.55
4.3.80.0050.00015.55
4.3.70.0000.00415.55
4.3.60.0030.00115.55
4.3.50.0000.00415.55
4.3.40.0000.00415.55
4.3.30.0030.00015.55
4.3.20.0000.00315.55
4.3.10.0000.00315.55
4.3.00.0000.00315.55

preferences:
59.17 ms | 403 KiB | 5 Q