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 ) { $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.0060.00319.72
8.4.10.0050.00323.70
8.3.140.0030.00716.60
8.3.130.0030.00718.46
8.3.120.0060.01319.13
8.3.110.0090.00016.45
8.3.100.0000.00816.92
8.3.90.0160.00326.77
8.3.80.0060.00316.63
8.3.70.0140.00716.75
8.3.60.0170.00716.47
8.3.50.0070.00720.18
8.3.40.0070.00720.24
8.3.30.0140.00718.89
8.3.20.0070.00024.18
8.3.10.0050.00224.66
8.3.00.0000.00826.16
8.2.260.0040.00416.85
8.2.250.0080.00018.62
8.2.240.0090.00917.25
8.2.230.0060.00320.94
8.2.220.0090.00037.54
8.2.210.0080.01126.77
8.2.200.0060.00318.54
8.2.190.0000.01416.75
8.2.180.0100.01025.92
8.2.170.0110.00718.99
8.2.160.0130.01022.96
8.2.150.0000.00925.66
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0070.00026.16
8.2.110.0060.00320.97
8.2.100.0070.00421.07
8.2.90.0000.00817.63
8.2.80.0050.00318.73
8.2.70.0030.00717.63
8.2.60.0070.00317.93
8.2.50.0000.00818.07
8.2.40.0040.00418.03
8.2.30.0040.00417.95
8.2.20.0030.00620.93
8.2.10.0040.00417.92
8.2.00.0040.00419.29
8.1.310.0030.00516.90
8.1.300.0060.00316.76
8.1.290.0060.00330.84
8.1.280.0100.00325.92
8.1.270.0050.00324.66
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00617.35
8.1.230.0030.00917.70
8.1.220.0000.00917.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0040.00417.25
8.1.180.0000.00818.10
8.1.170.0060.00318.95
8.1.160.0080.00018.96
8.1.150.0070.00318.55
8.1.140.0000.00817.39
8.1.130.0000.00717.50
8.1.120.0140.00217.57
8.1.110.0120.00617.56
8.1.100.0100.00717.52
8.1.90.0090.00017.43
8.1.80.0060.00917.48
8.1.70.0000.01417.39
8.1.60.0140.00717.68
8.1.50.0170.00317.45
8.1.40.0200.00017.58
8.1.30.0070.00917.39
8.1.20.0120.00617.68
8.1.10.0090.00417.54
8.1.00.0100.00717.34
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0030.00318.39
8.0.270.0040.00416.80
8.0.260.0000.00716.95
8.0.250.0060.00316.95
8.0.240.0100.00416.65
8.0.230.0130.00416.88
8.0.220.0040.01216.11
8.0.210.0070.00716.78
8.0.200.0120.00016.82
8.0.190.0100.00516.69
8.0.180.0090.00716.83
8.0.170.0160.00516.78
8.0.160.0160.00416.91
8.0.150.0080.00816.82
8.0.140.0050.01016.57
8.0.130.0090.00616.68
8.0.120.0110.00416.89
8.0.110.0130.00016.83
8.0.100.0080.00416.74
8.0.90.0080.00516.59
8.0.80.0080.00816.85
8.0.70.0090.00316.92
8.0.60.0040.00716.72
8.0.50.0100.00316.55
8.0.30.0100.00516.89
8.0.20.0070.00716.84
8.0.10.0100.00516.93
8.0.00.0250.00017.03
7.4.330.0000.00815.55
7.4.320.0050.00516.48
7.4.300.0080.00416.32
7.4.290.0080.00716.24
7.4.280.0110.00616.49
7.4.270.0090.00316.34
7.4.260.0110.00416.48
7.4.250.0100.00516.52
7.4.240.0140.00016.35
7.4.230.0120.00216.37
7.4.220.0090.00416.46
7.4.210.0140.00016.35
7.4.200.0070.00616.44
7.4.190.0100.00416.49
7.4.180.0060.00616.20
7.4.160.0170.00016.10
7.4.150.0100.00316.40
7.4.140.0090.00516.34
7.4.130.0130.00016.34
7.4.120.0140.00016.22
7.4.110.0120.00016.22
7.4.100.0080.00416.60
7.4.90.0080.00316.38
7.4.80.0070.00616.33
7.4.70.0110.00516.26
7.4.60.0120.00616.24
7.4.50.0070.00516.24
7.4.40.0160.00216.29
7.4.30.0000.01116.40
7.4.20.0080.00616.44
7.4.10.0120.00016.07
7.4.00.0070.00716.11
7.3.330.0110.00716.34
7.3.320.0120.00416.12
7.3.310.0090.00916.24
7.3.300.0060.00816.17
7.3.290.0120.00516.36
7.3.280.0050.01016.22
7.3.270.0120.00416.35
7.3.260.0090.00516.25
7.3.250.0100.00616.25
7.3.240.0100.00516.30
7.3.230.0150.00016.17
7.3.220.0050.01016.22
7.3.210.0150.00016.21
7.3.200.0110.00316.19
7.3.190.0090.00516.26
7.3.180.0080.00616.21
7.3.170.0080.00916.11
7.3.160.0110.00416.37
7.3.150.0060.00916.25
7.3.140.0070.00716.18
7.3.130.0080.00616.26
7.3.120.0100.00316.25
7.3.110.0100.00716.21
7.3.100.0140.00016.03
7.3.90.0000.01516.60
7.3.80.0050.01016.29
7.3.70.0150.00016.27
7.3.60.0140.00016.48
7.3.50.0120.00316.34
7.3.40.0130.00316.48
7.3.30.0110.00416.49
7.3.20.0110.00718.10
7.3.10.0100.00517.96
7.3.00.0120.00618.05
7.2.340.0070.00716.33
7.2.330.0130.00416.43
7.2.320.0120.00516.30
7.2.310.0070.00716.43
7.2.300.0000.01516.25
7.2.290.0170.00016.21
7.2.280.0150.00016.45
7.2.270.0140.00016.38
7.2.260.0090.00616.39
7.2.250.0150.00016.33
7.2.240.0090.00416.35
7.2.230.0150.00016.45
7.2.220.0130.00316.24
7.2.210.0130.00216.27
7.2.200.0150.00416.62
7.2.190.0150.00216.38
7.2.180.0110.00516.56
7.2.170.0110.00316.43
7.2.160.0070.00716.52
7.2.150.0060.01118.31
7.2.140.0150.00018.43
7.2.130.0120.00618.39
7.2.120.0110.00418.45
7.2.110.0150.00418.32
7.2.100.0090.00618.48
7.2.90.0130.00318.44
7.2.80.0100.00518.24
7.2.70.0090.00618.50
7.2.60.0100.00318.32
7.2.50.0080.00818.29
7.2.40.0120.00618.44
7.2.30.0150.00018.50
7.2.20.0150.00018.31
7.2.10.0170.00018.48
7.2.00.0120.00318.57
7.1.330.0110.00217.21
7.1.320.0120.00217.23
7.1.310.0040.00917.20
7.1.300.0130.00317.23
7.1.290.0080.00617.15
7.1.280.0080.00617.20
7.1.270.0070.00717.34
7.1.260.0100.00517.32
7.1.250.0070.00717.27
7.1.240.0130.00217.32
7.1.230.0120.00417.22
7.1.220.0130.00417.23
7.1.210.0080.00617.15
7.1.200.0150.00017.19
7.1.190.0060.00917.20
7.1.180.0080.00817.27
7.1.170.0140.00017.27
7.1.160.0120.00217.08
7.1.150.0130.00317.07
7.1.140.0100.00517.29
7.1.130.0070.00717.27
7.1.120.0130.00017.13
7.1.110.0090.00517.18
7.1.100.0100.00317.23
7.1.90.0070.00717.27
7.1.80.0090.00617.18
7.1.70.0140.00017.20
7.1.60.0070.00717.19
7.1.50.0140.00017.29
7.1.40.0070.00717.36
7.1.30.0090.00617.33
7.1.20.0050.01017.22
7.1.10.0100.00317.14
7.1.00.0050.01017.18
7.0.330.0140.00016.87
7.0.320.0170.00016.77
7.0.310.0110.00316.88
7.0.300.0100.00516.95
7.0.290.0130.00016.88
7.0.280.0090.00416.92
7.0.270.0110.00316.84
7.0.260.0070.00716.95
7.0.250.0110.00416.84
7.0.240.0060.00617.12
7.0.230.0120.00317.07
7.0.220.0090.00616.95
7.0.210.0130.00016.95
7.0.200.0050.00916.99
7.0.190.0140.00016.91
7.0.180.0030.01016.93
7.0.170.0100.00417.15
7.0.160.0070.00716.79
7.0.150.0050.00916.91
7.0.140.0100.00316.81
7.0.130.0110.00416.87
7.0.120.0090.00517.00
7.0.110.0090.00416.92
7.0.100.0090.00416.93
7.0.90.0080.00516.87
7.0.80.0100.00316.68
7.0.70.0050.00916.67
7.0.60.0030.01016.75
7.0.50.0130.00016.75
7.0.40.0110.00416.91
7.0.30.0110.00416.89
7.0.20.0130.00316.87
7.0.10.0110.00417.09
7.0.00.0130.00316.93
5.6.400.0110.00315.79
5.6.390.0090.00515.79
5.6.380.0090.00615.71
5.6.370.0140.00015.91
5.6.360.0110.00515.86
5.6.350.0090.00615.85
5.6.340.0080.00415.72
5.6.330.0040.01015.87
5.6.320.0080.00815.70
5.6.310.0090.00415.73
5.6.300.0110.00415.59
5.6.290.0140.00015.82
5.6.280.0140.00015.95
5.6.270.0080.00615.66
5.6.260.0090.00415.95
5.6.250.0100.00315.68
5.6.240.0100.00315.79
5.6.230.0040.00815.77
5.6.220.0100.00415.68
5.6.210.0100.00315.96
5.6.200.0090.00616.04
5.6.190.0080.00615.81
5.6.180.0140.00015.85
5.6.170.0090.00415.98
5.6.160.0000.01315.98
5.6.150.0110.00316.02
5.6.140.0100.00216.01
5.6.130.0080.00415.79
5.6.120.0090.00315.96
5.6.110.0130.00015.91
5.6.100.0120.00015.86
5.6.90.0130.00015.78
5.6.80.0130.00015.69
5.6.70.0090.00315.80
5.6.60.0110.00416.02
5.6.50.0050.00915.89
5.6.40.0090.00415.86
5.6.30.0080.00615.88
5.6.20.0080.00415.63
5.6.10.0000.01315.65
5.6.00.0130.00015.61
5.5.380.0110.00315.86
5.5.370.0140.00015.84
5.5.360.0130.00015.61
5.5.350.0110.00315.67
5.5.340.0040.00815.66
5.5.330.0090.00615.71
5.5.320.0110.00315.69
5.5.310.0130.00015.79
5.5.300.0110.00415.75
5.5.290.0100.00315.55
5.5.280.0100.00315.70
5.5.270.0130.00015.69
5.5.260.0140.00015.76
5.5.250.0100.00315.80
5.5.240.0080.00415.89
5.5.230.0100.00315.93
5.5.220.0080.00415.83
5.5.210.0040.00816.00
5.5.200.0070.00715.61
5.5.190.0100.00315.60
5.5.180.0050.00715.74
5.5.170.0120.00215.73
5.5.160.0070.00715.75
5.5.150.0030.01015.68
5.5.140.0040.00915.64
5.5.130.0110.00415.55
5.5.120.0090.00515.56
5.5.110.0110.00315.55
5.5.100.0050.00715.70
5.5.90.0040.00815.93
5.5.80.0080.00415.94
5.5.70.0080.00415.80
5.5.60.0080.00415.68
5.5.50.0090.00615.84
5.5.40.0130.00015.85
5.5.30.0040.00815.82
5.5.20.0130.00015.86
5.5.10.0120.00015.81
5.5.00.0080.00415.90
5.4.450.0080.00415.55
5.4.440.0130.00015.55
5.4.430.0070.00415.55
5.4.420.0050.00515.55
5.4.410.0110.00015.55
5.4.400.0090.00215.55
5.4.390.0090.00215.55
5.4.380.0070.00415.55
5.4.370.0080.00215.55
5.4.360.0120.00015.55
5.4.350.0040.00715.55
5.4.340.0050.00515.55
5.4.330.0100.00015.55
5.4.320.0110.00015.55
5.4.310.0090.00315.55
5.4.300.0110.00015.55
5.4.290.0080.00415.55
5.4.280.0070.00415.55
5.4.270.0060.00615.55
5.4.260.0120.00015.55
5.4.250.0000.01215.55
5.4.240.0110.00015.55
5.4.230.0060.00615.55
5.4.220.0080.00315.55
5.4.210.0080.00315.55
5.4.200.0060.00715.55
5.4.190.0100.00015.55
5.4.180.0090.00215.55
5.4.170.0080.00415.55
5.4.160.0110.00015.55
5.4.150.0110.00015.55
5.4.140.0050.00515.55
5.4.130.0080.00415.55
5.4.120.0070.00315.55
5.4.110.0060.00615.55
5.4.100.0040.00715.55
5.4.90.0000.00915.55
5.4.80.0080.00315.55
5.4.70.0110.00015.55
5.4.60.0110.00015.55
5.4.50.0100.00015.55
5.4.40.0100.00015.55
5.4.30.0050.00515.55
5.4.20.0030.00715.55
5.4.10.0050.00515.55
5.4.00.0070.00215.55
5.3.290.0050.00515.55
5.3.280.0110.00015.55
5.3.270.0060.00615.55
5.3.260.0110.00015.55
5.3.250.0080.00315.55
5.3.240.0130.00015.55
5.3.230.0100.00015.55
5.3.220.0000.01015.55
5.3.210.0080.00315.55
5.3.200.0080.00315.55
5.3.190.0100.00015.55
5.3.180.0100.00015.55
5.3.170.0100.00015.55
5.3.160.0100.00215.55
5.3.150.0080.00315.55
5.3.140.0000.01115.55
5.3.130.0080.00415.55
5.3.120.0000.01115.55
5.3.110.0050.00515.55
5.3.100.0050.00515.55
5.3.90.0000.01015.55
5.3.80.0000.00915.55
5.3.70.0070.00415.55
5.3.60.0070.00215.55
5.3.50.0060.00615.55
5.3.40.0080.00315.55
5.3.30.0110.00015.55
5.3.20.0100.00015.55
5.3.10.0100.00015.55
5.3.00.0110.00015.55
5.2.170.0050.00515.55
5.2.160.0050.00315.55
5.2.150.0040.00415.55
5.2.140.0030.00615.55
5.2.130.0050.00515.55
5.2.120.0050.00515.55
5.2.110.0070.00315.55
5.2.100.0070.00215.55
5.2.90.0040.00415.55
5.2.80.0100.00015.55
5.2.70.0110.00015.55
5.2.60.0000.00915.55
5.2.50.0080.00015.55
5.2.40.0030.00515.55
5.2.30.0080.00015.55
5.2.20.0040.00415.55
5.2.10.0090.00015.55
5.2.00.0030.00615.55
5.1.60.0040.00415.55
5.1.50.0050.00315.55
5.1.40.0000.00815.55
5.1.30.0040.00415.55
5.1.20.0050.00315.55
5.1.10.0080.00015.55
5.1.00.0000.00715.55
5.0.50.0060.00015.55
5.0.40.0040.00315.55
5.0.30.0040.00215.55
5.0.20.0070.00015.55
5.0.10.0000.00715.55
5.0.00.0040.00415.55
4.4.90.0000.00415.55
4.4.80.0000.00415.55
4.4.70.0040.00015.55
4.4.60.0030.00115.55
4.4.50.0020.00215.55
4.4.40.0040.00015.55
4.4.30.0040.00015.55
4.4.20.0040.00015.55
4.4.10.0040.00015.55
4.4.00.0000.00415.55
4.3.110.0040.00015.55
4.3.100.0000.00315.55
4.3.90.0040.00015.55
4.3.80.0000.00415.55
4.3.70.0000.00415.55
4.3.60.0000.00315.55
4.3.50.0020.00215.55
4.3.40.0040.00015.55
4.3.30.0020.00115.55
4.3.20.0030.00015.55
4.3.10.0030.00015.55
4.3.00.0000.00315.55

preferences:
59.09 ms | 403 KiB | 5 Q