3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $name; private $age; private $gender; public static $time; function __construct($name, $age, $gender, DateTime $time) { $this->name = $name; $this->age = $age; $this->gender = $gender; self::$time = $time->getTimestamp(); } } $foo = new Foo('hchen', 10, 'M', new DateTime('now')); $newFoo = Closure::bind( function() { return get_object_vars($this); }, $foo, 'Foo'); print_r(PHP_EOL.'<pre>========== START DEBUG: $newFoo =========='.PHP_EOL); print_r($newFoo()); print_r(PHP_EOL.'========== END OF $newFoo DEBUG ==========</pre>'.PHP_EOL); die(); ?>

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.0100.01018.80
8.3.50.0230.00822.16
8.3.40.0110.00419.05
8.3.30.0090.00619.07
8.3.20.0000.00820.16
8.3.10.0040.00423.61
8.3.00.0050.00320.50
8.2.180.0120.00317.00
8.2.170.0140.00422.96
8.2.160.0130.00722.19
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0050.00221.07
8.2.110.0030.00620.85
8.2.100.0110.00318.03
8.2.90.0110.00419.09
8.2.80.0030.00517.97
8.2.70.0030.00617.63
8.2.60.0060.00318.16
8.2.50.0030.00618.10
8.2.40.0040.00418.28
8.2.30.0060.00318.14
8.2.20.0050.00217.82
8.2.10.0040.00417.96
8.2.00.0000.00818.06
8.1.280.0130.00325.92
8.1.270.0040.00423.96
8.1.260.0090.00026.35
8.1.250.0070.00028.09
8.1.240.0090.00022.75
8.1.230.0040.00817.77
8.1.220.0000.00817.77
8.1.210.0000.00818.77
8.1.200.0000.00917.60
8.1.190.0040.00417.48
8.1.180.0000.00818.10
8.1.170.0040.00418.71
8.1.160.0000.00721.99
8.1.150.0040.00418.76
8.1.140.0040.00417.74
8.1.130.0000.00717.83
8.1.120.0000.00717.74
8.1.110.0000.00817.56
8.1.100.0070.00017.60
8.1.90.0080.00017.55
8.1.80.0000.00717.66
8.1.70.0040.00417.63
8.1.60.0060.00317.59
8.1.50.0000.00817.66
8.1.40.0050.00317.51
8.1.30.0000.00817.70
8.1.20.0050.00317.64
8.1.10.0080.00017.62
8.1.00.0040.00417.60
8.0.300.0080.00018.77
8.0.290.0030.00716.88
8.0.280.0000.00718.55
8.0.270.0030.00317.27
8.0.260.0070.00017.02
8.0.250.0000.00717.25
8.0.240.0040.00417.07
8.0.230.0070.00017.12
8.0.220.0040.00417.00
8.0.210.0030.00317.00
8.0.200.0060.00017.09
8.0.190.0000.00717.21
8.0.180.0030.00317.10
8.0.170.0040.00417.20
8.0.160.0000.00817.10
8.0.150.0040.00417.06
8.0.140.0040.00417.18
8.0.130.0000.00513.60
8.0.120.0040.00417.13
8.0.110.0030.00517.05
8.0.100.0040.00417.19
8.0.90.0000.00817.01
8.0.80.0120.00917.21
8.0.70.0050.00317.11
8.0.60.0000.00817.02
8.0.50.0040.00417.07
8.0.30.0060.01417.37
8.0.20.0130.01017.40
8.0.10.0040.00417.32
8.0.00.0190.02116.99
7.4.330.0030.00315.08
7.4.320.0000.00616.55
7.4.300.0060.00016.65
7.4.290.0050.00516.64
7.4.280.0040.00416.75
7.4.270.0050.00216.76
7.4.260.0030.00316.80
7.4.250.0000.00716.65
7.4.240.0030.00516.71
7.4.230.0030.00316.76
7.4.220.0090.01516.71
7.4.210.0070.01016.72
7.4.200.0000.00816.45
7.4.190.0030.00316.84
7.4.160.0030.01216.73
7.4.150.0210.00017.40
7.4.140.0140.00317.86
7.4.130.0080.00816.79
7.4.120.0110.00616.82
7.4.110.0080.00816.85
7.4.100.0070.01116.72
7.4.90.0180.00016.67
7.4.80.0150.00616.78
7.4.70.0110.00616.72
7.4.60.0040.01216.82
7.4.50.0030.00316.59
7.4.40.0030.01322.77
7.4.30.0040.01416.79
7.4.00.0130.00515.12
7.3.330.0000.00513.37
7.3.320.0000.00613.50
7.3.310.0070.00016.40
7.3.300.0030.00316.37
7.3.290.0080.00516.47
7.3.280.0080.00916.52
7.3.270.0090.00917.40
7.3.260.0170.00016.52
7.3.250.0080.01316.53
7.3.240.0130.00616.70
7.3.230.0100.00616.51
7.3.210.0030.01416.64
7.3.200.0130.00619.39
7.3.190.0020.01916.61
7.3.180.0100.01016.49
7.3.170.0150.00816.53
7.3.160.0070.01016.80
7.3.120.0100.00615.03
7.3.110.0060.01214.93
7.3.100.0070.00314.71
7.3.90.0100.00314.93
7.3.80.0120.00315.04
7.3.70.0090.00614.88
7.3.60.0030.01015.04
7.3.50.0070.00715.03
7.3.40.0070.00714.93
7.3.30.0070.00715.04
7.3.20.0040.01116.76
7.3.10.0000.01516.96
7.3.00.0110.00016.66
7.2.330.0060.01116.75
7.2.320.0080.01116.87
7.2.310.0050.01416.93
7.2.300.0040.01116.84
7.2.290.0110.00617.00
7.2.250.0120.00615.18
7.2.240.0070.01315.33
7.2.230.0070.00715.05
7.2.220.0100.00315.36
7.2.210.0040.00815.30
7.2.200.0070.01315.11
7.2.190.0060.00915.21
7.2.180.0100.00615.09
7.2.170.0100.00714.80
7.2.60.0070.00717.04
7.2.00.0030.01019.41
7.1.330.0070.01015.84
7.1.320.0060.00915.95
7.1.310.0140.00715.98
7.1.300.0030.01015.92
7.1.290.0060.00916.01
7.1.280.0060.00315.59
7.1.270.0030.01315.63
7.1.260.0090.00315.70
7.1.200.0050.00515.67
7.1.100.0030.01018.18
7.1.70.0030.00617.36
7.1.60.0100.01419.32
7.1.50.0000.01016.91
7.1.00.0030.07722.37
7.0.200.0790.00715.07
7.0.140.0100.06722.11
7.0.60.0070.08319.80
7.0.50.0030.04317.90
7.0.40.0130.08020.25
7.0.30.0200.04320.10
7.0.20.0170.08720.33
7.0.10.0370.07320.10
7.0.00.0070.04320.05
5.6.280.0000.07720.81
5.6.210.0000.08720.70
5.6.200.0070.04318.20
5.6.190.0030.07020.57
5.6.180.0430.08320.68
5.6.170.0330.07020.56
5.6.160.0200.07020.44
5.6.150.0030.08018.12
5.6.140.0100.07318.15
5.6.130.0070.07318.18
5.6.120.0070.06021.16
5.6.110.0070.08321.09
5.6.100.0200.07020.96
5.6.90.0170.07721.11
5.6.80.0130.07720.41
5.6.70.3700.03320.39
5.5.350.0000.08020.53
5.5.340.0130.07018.09
5.5.330.0130.07320.41
5.5.320.0070.04020.24
5.5.310.0130.04320.51
5.5.300.0170.07318.02
5.5.290.0030.07018.01
5.5.280.0130.08020.90
5.5.270.0070.04020.77
5.5.260.0030.07020.90
5.5.250.0070.04020.59
5.5.240.0100.04720.33
5.4.450.0530.04319.46
5.4.440.0600.04319.17
5.4.430.0370.03719.48
5.4.420.0230.03719.56
5.4.410.1270.04719.39
5.4.400.0370.05318.82
5.4.390.0370.07018.51
5.4.380.0800.06718.54
5.4.370.0270.05018.78
5.4.360.0230.05018.57
5.4.350.0330.04318.57
5.4.340.0170.05718.52
5.4.320.0070.03612.50
5.4.310.0040.04012.50
5.4.300.0060.03912.50
5.4.290.0050.04212.50
5.4.280.0080.04012.40
5.4.270.0090.03712.40
5.4.260.0030.04012.40
5.4.250.0080.03812.40
5.4.240.0040.04512.40
5.4.230.0090.04412.39
5.4.220.0040.04512.39
5.4.210.0060.03812.40
5.4.200.0090.03912.39
5.4.190.0170.04012.36
5.4.180.0230.06512.37
5.4.170.0100.04812.38
5.4.160.0160.04212.38
5.4.150.0150.04412.37
5.4.140.0150.04212.05
5.4.130.0340.08512.04
5.4.120.0110.04612.00
5.4.110.0190.04412.00
5.4.100.0140.04612.00
5.4.90.0140.04612.00
5.4.80.0170.04312.00
5.4.70.0150.04211.99
5.4.60.0090.04711.99
5.4.50.0160.04211.98
5.4.40.0170.04111.98
5.4.30.0120.04611.98
5.4.20.0210.06711.98
5.4.10.0130.04411.98
5.4.00.0200.03611.46
5.3.290.0060.03912.80
5.3.280.0070.04112.71
5.3.270.0150.04512.73
5.3.260.0170.04512.71
5.3.250.0140.04612.72
5.3.240.0240.06712.72
5.3.230.0220.03912.71
5.3.220.0210.03912.68
5.3.210.0150.04512.68
5.3.200.0200.04312.68
5.3.190.0170.04512.68
5.3.180.0360.08412.67
5.3.170.0190.04012.67
5.3.160.0210.03812.68
5.3.150.0210.03812.67
5.3.140.0160.04312.66
5.3.130.0170.04312.66
5.3.120.0190.04112.66
5.3.110.0120.04712.66
5.3.100.0200.04012.12
5.3.90.0170.07112.09
5.3.80.0130.04712.08
5.3.70.0140.04512.08
5.3.60.0180.04112.06
5.3.50.0170.04412.01
5.3.40.0160.04812.01
5.3.30.0110.04711.97
5.3.20.0150.04611.75
5.3.10.0190.03811.72
5.3.00.0170.04011.71
5.2.170.0090.0439.20
5.2.160.0120.0369.20
5.2.150.0270.0809.20
5.2.140.0110.0389.20
5.2.130.0130.0339.16
5.2.120.0160.0319.16
5.2.110.0120.0369.17
5.2.100.0100.0369.16
5.2.90.0090.0369.16
5.2.80.0130.0339.15
5.2.70.0130.0359.15
5.2.60.0140.0349.11
5.2.50.0290.0789.08
5.2.40.0150.0319.05
5.2.30.0110.0349.02
5.2.20.0130.0339.03
5.2.10.0070.0388.93
5.2.00.0120.0328.77
5.1.60.0140.0248.07
5.1.50.0090.0328.07
5.1.40.0120.0278.06
5.1.30.0100.0328.39
5.1.20.0130.0298.43
5.1.10.0120.0298.14
5.1.00.0150.0268.14
5.0.50.0120.0216.63
5.0.40.0070.0256.48
5.0.30.0070.0386.29
5.0.20.0320.0616.26
5.0.10.0110.0236.24
5.0.00.0110.0356.23
4.4.90.0090.0164.78
4.4.80.0090.0154.76
4.4.70.0070.0184.75
4.4.60.0110.0154.75
4.4.50.0220.0664.77
4.4.40.0080.0284.71
4.4.30.0070.0194.76
4.4.20.0080.0184.85
4.4.10.0070.0204.85
4.4.00.0090.0264.75
4.3.110.0080.0174.67
4.3.100.0090.0164.67
4.3.90.0070.0174.63
4.3.80.0070.0274.59
4.3.70.0080.0154.63
4.3.60.0150.0394.63
4.3.50.0060.0184.63
4.3.40.0090.0244.54
4.3.30.0040.0193.30
4.3.20.0070.0163.27
4.3.10.0140.0703.24
4.3.00.0000.01715.45

preferences:
46.07 ms | 401 KiB | 5 Q