3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SillyTestClass extends DOMElement{ public $foo=null; public function __construct($name,$value=null,$namespace=null){ echo "calling child construct...."; $this->foo="bar"; parent::__construct($name,$value,$namespace); } public function sayHello(){ echo "Why, hello there!"; } } $doc=new DOMDocument(); $doc->registerNodeClass('DOMElement','SillyTestClass'); $doc->loadHTML("<div><h1>Sample</h1></div>"); //THIS WORKS! CUSTOM CLASS BEING USED $doc->documentElement->firstChild->sayHello(); //THIS IS STILL NULL:( Never set by construct, no message saying construct was called either echo $doc->documentElement->firstChild->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.60.0140.00316.88
8.3.50.0150.00618.29
8.3.40.0100.01018.95
8.3.30.0110.00418.67
8.3.20.0080.00018.91
8.3.10.0050.00323.58
8.3.00.0050.00223.82
8.2.180.0090.00616.75
8.2.170.0110.00322.96
8.2.160.0160.00019.39
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00420.59
8.2.120.0040.00426.35
8.2.110.0040.00720.52
8.2.100.0070.00417.84
8.2.90.0050.00319.30
8.2.80.0000.00817.97
8.2.70.0000.00818.18
8.2.60.0100.00018.34
8.2.50.0000.00818.10
8.2.40.0050.00320.70
8.2.30.0050.00519.42
8.2.20.0000.00818.29
8.2.10.0040.00418.29
8.2.00.0040.00419.79
8.1.280.0070.00725.92
8.1.270.0070.00022.27
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0100.00019.40
8.1.230.0080.00419.07
8.1.220.0040.00417.91
8.1.210.0000.00818.77
8.1.200.0030.00617.36
8.1.190.0040.00417.25
8.1.180.0030.00618.10
8.1.170.0080.00019.02
8.1.160.0000.00719.00
8.1.150.0040.00419.10
8.1.140.0030.00520.92
8.1.130.0000.00717.66
8.1.120.0040.00417.66
8.1.110.0030.00517.61
8.1.100.0000.00717.54
8.1.90.0040.00717.64
8.1.80.0050.00317.66
8.1.70.0070.00017.54
8.1.60.0030.00617.82
8.1.50.0030.00517.72
8.1.40.0000.00817.67
8.1.30.0030.00617.88
8.1.20.0000.00817.78
8.1.10.0050.00217.80
8.1.00.0020.00517.76
8.0.300.0030.00618.77
8.0.290.0040.00417.00
8.0.280.0030.00318.59
8.0.270.0000.00717.55
8.0.260.0040.00417.00
8.0.250.0070.00017.17
8.0.240.0000.00917.14
8.0.230.0080.00017.12
8.0.220.0040.00416.96
8.0.210.0030.00417.04
8.0.200.0060.00317.14
8.0.190.0000.00717.11
8.0.180.0000.00717.11
8.0.170.0070.00317.07
8.0.160.0050.00217.01
8.0.150.0000.00716.87
8.0.140.0070.00017.10
8.0.130.0030.00313.45
8.0.120.0080.00016.98
8.0.110.0000.00817.04
8.0.100.0000.00716.91
8.0.90.0000.00717.15
8.0.80.0080.00817.08
8.0.70.0030.01516.96
8.0.60.0110.01117.08
8.0.50.0180.00316.95
8.0.30.0120.00917.11
8.0.20.0080.01117.32
8.0.10.0090.01217.06
8.0.00.0140.00817.14
7.4.330.0000.00515.55
7.4.320.0030.00316.80
7.4.300.0070.00016.73
7.4.290.0020.00516.79
7.4.280.0000.00816.88
7.4.270.0000.00716.61
7.4.260.0070.00016.90
7.4.250.0000.00816.82
7.4.240.0040.00416.77
7.4.230.0000.00716.89
7.4.220.0030.00616.79
7.4.210.0070.01016.86
7.4.200.0030.01716.91
7.4.190.0070.01416.89
7.4.180.0070.01416.63
7.4.160.0090.00816.72
7.4.150.0040.01116.91
7.4.140.0060.01317.65
7.4.130.0090.00716.73
7.4.120.0060.01216.77
7.4.110.0040.01516.72
7.4.100.0110.00816.74
7.4.90.0080.00816.69
7.4.80.0090.00818.11
7.4.70.0070.00916.64
7.4.60.0090.00716.78
7.4.50.0090.00616.79
7.4.40.0140.00416.69
7.4.30.0100.01016.59
7.4.20.0060.01116.72
7.4.10.0070.00716.68
7.4.00.0080.00615.94
7.3.330.0030.00313.44
7.3.320.0000.00613.38
7.3.310.0000.00716.46
7.3.300.0000.00716.40
7.3.290.0030.00316.55
7.3.280.0080.00716.42
7.3.270.0090.01016.40
7.3.260.0110.00816.53
7.3.250.0090.00616.51
7.3.240.0100.01016.65
7.3.230.0080.01216.61
7.3.220.0110.00416.43
7.3.210.0070.00916.44
7.3.200.0130.00516.46
7.3.190.0100.00616.53
7.3.180.0070.01516.43
7.3.170.0090.00916.56
7.3.160.0110.00616.42
7.3.150.0100.00616.45
7.3.140.0000.01516.42
7.3.130.0000.01416.37
7.3.120.0140.00016.52
7.3.110.0030.01016.29
7.3.100.0100.00316.32
7.3.90.0000.01316.62
7.3.80.0030.01016.30
7.3.70.0110.00316.41
7.3.60.0110.00316.60
7.3.50.0060.00816.47
7.3.40.0070.00716.54
7.3.30.0040.01116.59
7.3.20.0120.00316.49
7.3.10.0070.01416.63
7.3.00.0030.01316.64
7.2.340.0150.01516.50
7.2.330.0150.01016.63
7.2.320.0120.01116.74
7.2.310.0110.01016.50
7.2.300.0220.00916.65
7.2.290.0110.01116.74
7.2.280.0230.00916.50
7.2.270.0200.01016.46
7.2.260.0150.01116.59
7.2.250.0150.01516.59
7.2.240.0180.01116.57
7.2.230.0200.00916.54
7.2.220.0160.01016.59
7.2.210.0190.01016.41
7.2.200.0210.00916.70
7.2.190.0180.00916.56
7.2.180.0180.01116.69
7.2.170.0310.01216.64
7.2.160.0240.00916.69
7.2.150.1720.01116.68
7.2.140.0100.01616.87
7.2.130.0160.01016.94
7.2.120.0140.01816.92
7.2.110.0240.00316.80
7.2.100.0220.00516.98
7.2.90.0190.01016.82
7.2.80.0270.00615.71
7.2.70.0120.01415.99
7.2.60.0250.01315.93
7.2.50.0300.01015.90
7.2.40.0140.01416.01
7.2.30.0180.00916.00
7.2.20.0310.00915.98
7.2.10.0200.01015.98
7.2.00.0270.00615.82
7.1.330.0260.00315.73
7.1.320.0090.02115.58
7.1.310.0170.00815.64
7.1.300.0140.01715.69
7.1.290.0200.01015.70
7.1.280.0190.00815.63
7.1.270.1760.00315.66
7.1.260.0120.01215.62
7.1.250.0170.00715.55
7.1.240.0230.00415.65
7.1.230.0200.01015.76
7.1.220.0170.01015.66
7.1.210.0170.01215.73
7.1.200.0100.01115.69
7.1.190.0240.00714.76
7.1.180.0230.01214.83
7.1.170.0180.00314.82
7.1.160.0250.00514.69
7.1.150.0260.00614.49
7.1.140.0260.00914.69
7.1.130.0230.00614.79
7.1.120.0320.00714.74
7.1.110.0200.00814.73
7.1.100.0200.00714.65
7.1.90.0280.00614.71
7.1.80.0170.00514.80
7.1.70.0170.00914.48
7.1.60.0250.01223.62
7.1.50.0470.01223.63
7.1.40.0280.01123.76
7.1.30.0330.00923.63
7.1.20.0310.01223.66
7.1.10.0220.00914.46
7.1.00.0230.00814.71
7.0.330.0220.00815.31
7.0.320.0250.00315.43
7.0.310.0200.01015.31
7.0.300.0220.00415.26
7.0.290.0130.01015.41
7.0.280.0110.01415.40
7.0.270.0140.00815.48
7.0.260.0220.00315.41
7.0.250.0170.00915.46
7.0.240.0110.01515.45
7.0.230.0170.00715.50
7.0.220.0140.01115.48
7.0.210.0230.00615.47
7.0.200.0160.01115.43
7.0.190.0160.01415.51
7.0.180.0230.00615.48
7.0.170.0610.00815.51
7.0.160.0290.00415.34
7.0.150.0110.01815.41
7.0.140.0130.01315.32
7.0.130.0160.00815.51
7.0.120.0140.01415.54
7.0.110.0180.00915.26
7.0.100.0260.00315.31
7.0.90.0220.01115.38
7.0.80.0200.00915.28
7.0.70.0200.00715.27
7.0.60.0150.01015.39
7.0.50.0130.01315.32
7.0.40.0140.01415.36
7.0.30.0180.00915.43
7.0.20.0090.01715.36
7.0.10.0150.00715.42
7.0.00.0180.00715.36
5.6.400.0170.00715.93
5.6.390.0190.01116.04
5.6.380.0150.00916.04
5.6.370.0230.00615.98
5.6.360.0220.00915.94
5.6.350.0230.01016.08
5.6.340.0180.00616.16
5.6.330.0230.00515.98
5.6.320.0230.01016.05
5.6.310.0170.01416.11
5.6.300.0170.01015.86
5.6.290.0230.01016.22
5.6.280.0150.01315.95
5.6.270.0150.01116.14
5.6.260.0200.00616.14
5.6.250.0210.00515.86
5.6.240.0240.00016.15
5.6.230.0190.01016.03
5.6.220.0230.01316.20
5.6.210.0170.00916.09
5.6.200.0170.01016.11
5.6.190.0160.00816.14
5.6.180.0170.00716.21
5.6.170.0120.01216.16
5.6.160.0140.01016.34
5.6.150.0170.00716.14
5.6.140.0170.00816.20
5.6.130.0180.00616.28
5.6.120.0260.00015.98
5.6.110.0150.01016.21
5.6.100.0210.00515.98
5.6.90.0190.00816.02
5.6.80.0190.00916.21
5.6.70.0160.00616.14
5.6.60.0180.00616.34
5.6.50.0150.01316.14
5.6.40.0090.01515.95
5.6.30.0090.01616.07
5.6.20.0150.00815.89
5.6.10.0200.00415.79
5.6.00.0160.00815.96
5.5.380.0210.01216.05
5.5.370.0140.01116.25
5.5.360.0220.00015.95
5.5.350.0130.00916.02
5.5.340.0210.00915.94
5.5.330.0130.01316.04
5.5.320.0170.00915.96
5.5.310.0140.01016.05
5.5.300.0170.00715.96
5.5.290.0160.00715.97
5.5.280.0160.01215.96
5.5.270.0150.00915.93
5.5.260.0150.01115.90
5.5.250.0150.01116.05
5.5.240.0220.00016.05
5.5.230.0090.01216.02
5.5.220.0110.01116.09
5.5.210.0140.01016.15
5.5.200.0220.00515.80
5.5.190.0190.00915.90
5.5.180.0160.01115.98
5.5.170.0200.00515.97
5.5.160.0140.00915.88
5.5.150.0170.01315.88
5.5.140.0120.02015.68
5.5.130.0270.00515.70
5.5.120.0210.00815.88
5.5.110.0200.00515.75
5.5.100.0130.01015.93
5.5.90.0110.01115.98
5.5.80.0240.00315.98
5.5.70.0200.01115.88
5.5.60.0280.00416.10
5.5.50.0200.01015.98
5.5.40.0120.01516.07
5.5.30.0150.01215.97
5.5.20.0110.01116.00
5.5.10.0100.01616.07
5.5.00.0170.01716.11
5.4.450.0100.01012.92
5.4.440.0150.00312.87
5.4.430.0150.00312.79
5.4.420.0090.00913.09
5.4.410.0100.01012.99
5.4.400.0140.00312.73
5.4.390.0160.00012.85
5.4.380.0160.00512.80
5.4.370.0100.01012.93
5.4.360.0110.00812.86
5.4.350.0070.01012.86
5.4.340.0140.00312.84
5.4.330.0140.00612.75
5.4.320.0140.00312.88
5.4.310.0170.00412.90
5.4.300.0120.00712.90
5.4.290.0150.00312.83
5.4.280.0140.00312.88
5.4.270.0100.01012.99
5.4.260.0210.00312.84
5.4.250.0160.00812.85
5.4.240.0140.00513.03
5.4.230.0090.00912.84
5.4.220.0140.00412.66
5.4.210.0100.01012.60
5.4.200.0130.00512.60
5.4.190.0140.00612.67
5.4.180.0130.00612.67
5.4.170.0080.01112.56
5.4.160.0180.00312.61
5.4.150.0170.00312.78
5.4.140.0130.00312.86
5.4.130.0050.01312.84
5.4.120.0150.00612.80
5.4.110.0080.00812.89
5.4.100.0180.00012.84
5.4.90.0090.00912.96
5.4.80.0060.01212.89
5.4.70.0140.00513.03
5.4.60.0140.00313.03
5.4.50.0110.00712.83
5.4.40.0120.00612.97
5.4.30.0130.00313.03
5.4.20.0130.00413.03
5.4.10.0090.00913.00
5.4.00.0110.00612.96
5.3.290.0210.00813.30
5.3.280.0120.00613.30
5.3.270.0130.00713.36
5.3.260.0210.00513.59
5.3.250.0140.00413.25
5.3.240.0080.01113.51
5.3.230.0120.00713.17
5.3.220.0050.01413.27
5.3.210.0140.00413.03
5.3.200.0040.01513.14
5.3.190.0170.00313.09
5.3.180.0130.00513.30
5.3.170.0140.00313.27
5.3.160.0140.00413.40
5.3.150.0090.00913.33
5.3.140.0140.01113.20
5.3.130.0110.01113.11
5.3.120.0180.00513.17
5.3.110.0140.00513.39
5.3.100.0070.01113.24
5.3.90.0100.00913.32
5.3.80.0110.01113.14
5.3.70.0170.00413.04
5.3.60.0150.00713.38
5.3.50.0130.00613.49
5.3.40.0100.01013.31
5.3.30.0120.00613.15
5.3.20.0100.00713.20
5.3.10.0080.00913.07
5.3.00.0150.00512.93
5.2.170.0120.00612.16
5.2.160.0140.00312.34
5.2.150.0090.00612.19
5.2.140.0120.00312.13
5.2.130.0110.00412.25
5.2.120.0040.01412.52
5.2.110.0050.01112.15
5.2.100.0110.00512.09
5.2.90.0080.00811.99
5.2.80.0080.00811.94
5.2.70.0130.00611.93
5.2.60.0040.01211.86
5.2.50.0110.00512.11
5.2.40.0170.00011.97
5.2.30.0110.00712.19
5.2.20.0070.01012.09
5.2.10.0080.00911.90
5.2.00.0080.00812.16
5.1.60.0100.00310.87
5.1.50.0100.00310.93
5.1.40.0080.00411.08
5.1.30.0090.00311.18
5.1.20.0070.00611.12
5.1.10.0060.00711.09
5.1.00.0040.00810.83
5.0.50.0080.00310.18
5.0.40.0030.00710.02
5.0.30.0100.0009.95
5.0.20.0070.00310.22
5.0.10.0080.0039.82
5.0.00.0090.0029.82
4.4.90.0040.0049.82
4.4.80.0000.0079.82
4.4.70.0060.0039.82
4.4.60.0050.0039.82
4.4.50.0040.0049.82
4.4.40.0030.0039.82
4.4.30.0040.0029.82
4.4.20.0070.0009.82
4.4.10.0080.0009.82
4.4.00.0040.0029.82
4.3.110.0030.0039.82
4.3.100.0000.0079.82
4.3.90.0040.0049.82
4.3.80.0070.0009.82
4.3.70.0030.0049.82
4.3.60.0040.0049.82
4.3.50.0000.0089.82
4.3.40.0070.0009.82
4.3.30.0060.0009.82
4.3.20.0060.0009.82
4.3.10.0000.0069.82
4.3.00.0030.0039.82

preferences:
57.95 ms | 400 KiB | 5 Q