3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $name; function __construct($param){ $this->name = 'liming'.'<br>'; } function getName() { echo $this->name; } // 调用子类中的方法getAge2 function getAge() { $this->getAge2(); } function getAge3() { return '23'; } } class B extends A { function getAge2(){ echo $this->getAge3(); } } (new A('1'))->getAge();

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.0040.01118.68
8.3.50.0030.01118.09
8.3.40.0070.00718.76
8.3.30.0030.01218.88
8.3.20.0050.00221.81
8.3.10.0000.00723.66
8.3.00.0060.00323.65
8.2.180.0110.00716.61
8.2.170.0110.00422.96
8.2.160.0030.01020.45
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00320.96
8.2.120.0070.00026.35
8.2.110.0090.00022.09
8.2.100.0110.00419.45
8.2.90.0030.00517.50
8.2.80.0040.00418.93
8.2.70.0030.00517.93
8.2.60.0030.00617.63
8.2.50.0040.00418.22
8.2.40.0040.00420.65
8.2.30.0040.00419.47
8.2.20.0040.00417.96
8.2.10.0000.00917.59
8.2.00.0000.00717.95
8.1.280.0170.00325.92
8.1.270.0040.00423.92
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00321.92
8.1.230.0080.00317.70
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0030.00617.10
8.1.190.0050.00317.23
8.1.180.0060.00318.10
8.1.170.0050.00318.41
8.1.160.0040.00418.83
8.1.150.0030.00320.23
8.1.140.0000.00817.62
8.1.130.0000.00720.88
8.1.120.0030.00317.41
8.1.110.0000.00717.37
8.1.100.0040.00417.34
8.1.90.0000.00817.41
8.1.80.0080.00017.40
8.1.70.0000.00817.40
8.1.60.0050.00417.59
8.1.50.0040.00417.42
8.1.40.0070.00017.52
8.1.30.0040.00417.63
8.1.20.0000.00817.56
8.1.10.0030.00517.55
8.1.00.0060.00317.57
8.0.300.0000.00818.77
8.0.290.0050.00216.63
8.0.280.0040.00418.40
8.0.270.0040.00417.19
8.0.260.0000.00616.86
8.0.250.0070.00016.87
8.0.240.0030.00516.94
8.0.230.0030.00316.94
8.0.220.0050.00216.93
8.0.210.0000.00716.79
8.0.200.0030.00316.82
8.0.190.0050.00216.97
8.0.180.0040.00416.97
8.0.170.0050.00316.79
8.0.160.0040.00416.82
8.0.150.0060.00416.83
8.0.140.0040.00416.86
8.0.130.0030.00313.30
8.0.120.0040.00416.87
8.0.110.0000.00716.82
8.0.100.0030.00516.92
8.0.90.0080.00016.85
8.0.80.0060.00916.80
8.0.70.0000.00817.01
8.0.60.0070.00016.74
8.0.50.0000.00816.76
8.0.30.0100.00817.00
8.0.20.0080.01017.40
8.0.10.0000.00717.05
8.0.00.0110.00616.83
7.4.330.0050.00015.55
7.4.320.0000.00716.48
7.4.300.0000.00616.54
7.4.290.0080.00416.43
7.4.280.0040.00416.52
7.4.270.0050.00316.43
7.4.260.0000.00716.57
7.4.250.0080.00016.32
7.4.240.0050.00316.45
7.4.230.0030.00316.25
7.4.220.0000.00716.33
7.4.210.0080.00516.55
7.4.200.0030.00516.36
7.4.160.0110.00716.56
7.4.140.0120.00717.86
7.4.130.0100.00716.46
7.4.120.0120.00816.54
7.4.110.0100.00716.57
7.4.100.0070.01116.43
7.4.90.0040.01316.57
7.4.80.0120.00919.39
7.4.70.0120.00916.56
7.4.60.0100.00616.42
7.4.50.0030.00916.45
7.4.40.0120.00316.55
7.4.00.0040.01214.96
7.3.330.0060.00013.23
7.3.320.0030.00313.36
7.3.310.0000.00716.41
7.3.300.0070.00016.26
7.3.290.0080.01016.40
7.3.280.0070.00916.35
7.3.260.0110.00816.33
7.3.250.0070.01016.43
7.3.240.0090.00716.46
7.3.230.0150.00316.39
7.3.210.0130.00316.30
7.3.200.0170.00016.48
7.3.190.0110.00516.23
7.3.180.0060.01516.55
7.3.170.0090.00616.52
7.3.160.0100.00616.57
7.3.120.0070.01114.88
7.3.110.0050.01014.76
7.3.100.0080.00714.97
7.3.90.0070.00814.93
7.3.80.0020.01014.78
7.3.70.0070.00314.90
7.3.60.0060.00514.59
7.3.50.0040.00814.84
7.3.40.0050.01114.79
7.3.30.0080.00814.58
7.3.20.0050.00616.72
7.3.10.0030.01016.71
7.3.00.0070.00716.64
7.2.330.0130.00416.41
7.2.320.0090.01216.48
7.2.310.0080.01116.55
7.2.300.0060.01216.41
7.2.290.0140.00316.32
7.2.250.0070.01214.87
7.2.240.0070.01014.95
7.2.230.0060.00914.95
7.2.220.0070.00914.86
7.2.210.0070.01015.03
7.2.200.0090.00515.04
7.2.190.0020.01114.99
7.2.180.0050.01014.90
7.2.170.0090.00914.83
7.2.160.0100.00714.79
7.2.150.0000.01617.01
7.2.140.0030.01416.84
7.2.130.0140.00016.82
7.2.120.0000.00916.61
7.2.110.0100.00716.82
7.2.100.0090.00616.54
7.2.90.0030.01316.94
7.2.80.0100.00316.48
7.2.70.0030.01016.86
7.2.60.0080.00816.63
7.2.50.0060.00616.75
7.2.40.0040.01216.84
7.2.30.0060.01317.39
7.2.20.0040.01317.42
7.2.10.0080.01017.24
7.2.00.0070.01117.29
7.1.330.0090.00615.78
7.1.320.0050.01115.64
7.1.310.0060.00815.73
7.1.300.0060.00715.64
7.1.290.0090.00315.63
7.1.280.0070.00715.56
7.1.270.0040.01015.64
7.1.260.0070.00615.74
7.1.250.0040.01115.72
7.1.200.0060.00615.55
7.1.150.0090.01416.89
7.1.140.0090.00916.94
7.1.130.0140.00916.87
7.1.120.0120.01416.57
7.1.110.0080.01016.00
7.1.100.0080.00916.20
7.1.90.0100.00715.81
7.1.80.0100.00816.00
7.1.70.0080.00915.29
7.1.60.0200.01833.23
7.1.50.0270.02632.78
7.1.40.0220.01532.47
7.1.30.0270.01232.63
7.1.20.0260.01432.54
7.1.10.0100.00814.56
7.1.00.0130.01114.62

preferences:
58.56 ms | 401 KiB | 5 Q