3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * Examples of DoublyLinkedList */ $obj = new SplDoublyLinkedList(); // Check wither linked list is empty if ($obj->isEmpty()) { echo "Adding nodes to Linked List<br>"; $obj->push(2); $obj->push(3); echo "Adding the node at beginning of doubly linked list <br>"; $obj->unshift(10); } echo "<br>Our Linked List:"; print_r($obj); $curr = $obj->current(); // this will return NULL as we have not set initial node. echo "<br> Rewinding the position so that current node points to first node "; $obj->rewind(); echo "<br>Current node of the linked list:"; echo $obj->current(); // this will print first node of the linked list. echo "<br>Moving to Next node:"; $obj->next(); echo "<br>Printing the next node:"; echo $obj->current();

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.0070.01016.50
8.3.50.0130.00622.81
8.3.40.0200.00018.79
8.3.30.0140.00019.14
8.3.20.0040.00420.31
8.3.10.0050.00323.71
8.3.00.0000.00819.38
8.2.180.0120.00316.50
8.2.170.0090.00622.96
8.2.160.0090.00622.13
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00421.18
8.2.110.0100.00020.36
8.2.100.0080.00318.09
8.2.90.0040.00419.08
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0040.00418.09
8.2.30.0070.00019.48
8.2.20.0000.00717.63
8.2.10.0040.00417.95
8.2.00.0040.00417.52
8.1.280.0140.00725.92
8.1.270.0060.00323.84
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0050.00523.82
8.1.230.0080.00318.96
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0060.00317.10
8.1.190.0000.00817.13
8.1.180.0040.00418.10
8.1.170.0030.00518.61
8.1.160.0000.00722.04
8.1.150.0000.00718.79
8.1.140.0070.00017.33
8.1.130.0070.00017.89
8.1.120.0050.00317.34
8.1.110.0080.00017.40
8.1.100.0070.00017.27
8.1.90.0000.00717.45
8.1.80.0000.00717.34
8.1.70.0070.00017.40
8.1.60.0080.00017.55
8.1.50.0080.00017.45
8.1.40.0040.00417.45
8.1.30.0000.00917.50
8.1.20.0040.00417.50
8.1.10.0000.00717.49
8.1.00.0040.00417.55
8.0.300.0000.00718.77
8.0.290.0040.00416.63
8.0.280.0040.00418.47
8.0.270.0040.00417.18
8.0.260.0000.00617.30
8.0.250.0070.00017.00
8.0.240.0030.00316.95
8.0.230.0000.00716.82
8.0.220.0040.00416.86
8.0.210.0040.00416.82
8.0.200.0070.00016.88
8.0.190.0000.00816.78
8.0.180.0000.00716.81
8.0.170.0080.00016.77
8.0.160.0040.00416.86
8.0.150.0070.00016.86
8.0.140.0030.00516.76
8.0.130.0030.00313.33
8.0.120.0040.00416.71
8.0.110.0000.00916.86
8.0.100.0050.00316.92
8.0.90.0040.00416.70
8.0.80.0030.01716.88
8.0.70.0050.00316.73
8.0.60.0030.00516.77
8.0.50.0040.00416.80
8.0.30.0080.01117.12
8.0.20.0160.00517.40
8.0.10.0040.00416.84
8.0.00.0110.00616.67
7.4.330.0030.00315.00
7.4.320.0000.00616.56
7.4.300.0060.00016.62
7.4.290.0030.00316.57
7.4.280.0030.00616.48
7.4.270.0000.00716.50
7.4.260.0030.00316.45
7.4.250.0000.00716.43
7.4.240.0030.00416.51
7.4.230.0030.00316.55
7.4.220.0120.00916.62
7.4.210.0090.00616.59
7.4.200.0000.00716.47
7.4.160.0070.00716.43
7.4.150.0180.00017.40
7.4.140.0080.01017.86
7.4.130.0110.00816.53
7.4.120.0110.00716.50
7.4.110.0130.00716.52
7.4.100.0100.00716.46
7.4.90.0140.00516.48
7.4.80.0090.00919.39
7.4.70.0170.00016.41
7.4.60.0070.01016.35
7.4.50.0000.00816.31
7.4.40.0090.00816.30
7.4.30.0090.00616.68
7.4.10.0070.01015.34
7.4.00.0060.01215.26
7.3.330.0000.00613.07
7.3.320.0020.00213.05
7.3.310.0030.00316.26
7.3.300.0040.00415.95
7.3.290.0070.01116.24
7.3.280.0100.00516.18
7.3.270.0130.00417.40
7.3.260.0130.00416.28
7.3.250.0110.01216.46
7.3.240.0120.00616.20
7.3.230.0110.00716.39
7.3.210.0070.01116.55
7.3.200.0110.00919.39
7.3.190.0030.01716.23
7.3.180.0140.00016.18
7.3.170.0080.00916.39
7.3.160.0060.01016.39
7.3.130.0140.00515.04
7.3.120.0080.00915.13
7.3.110.0020.01315.14
7.3.100.0040.01115.23
7.3.90.0110.00415.20
7.3.80.0070.00714.94
7.3.70.0060.00615.17
7.3.60.0070.00315.18
7.3.50.0070.00515.13
7.3.40.0040.00715.09
7.3.30.0050.00815.12
7.3.20.0020.01116.48
7.3.10.0010.00916.55
7.3.00.0070.00716.52
7.2.330.0090.00816.57
7.2.320.0060.01016.34
7.2.310.0080.01116.43
7.2.300.0160.00616.39
7.2.290.0030.01316.41
7.2.260.0050.01215.20
7.2.250.0030.01215.37
7.2.240.0090.00715.32
7.2.230.0090.00915.34
7.2.220.0030.01115.32
7.2.210.0050.00715.35
7.2.200.0050.00815.36
7.2.190.0110.00315.10
7.2.180.0070.00815.28
7.2.170.0050.00415.24
7.2.160.0070.00415.19
7.2.150.0080.00616.85
7.2.140.0050.00816.80
7.2.130.0060.00716.79
7.2.120.0080.00616.74
7.2.110.0080.00616.84
7.2.100.0070.00616.69
7.2.90.0050.00916.71
7.2.80.0070.00916.74
7.2.70.0060.00716.88
7.2.60.0050.00916.79
7.2.50.0070.00916.81
7.2.40.0060.00816.70
7.2.30.0100.00616.86
7.2.20.0050.00816.59
7.2.10.0050.00916.78
7.2.00.0040.00917.21
7.1.330.0080.00615.92
7.1.320.0090.00515.79
7.1.310.0050.00715.82
7.1.300.0050.00615.77
7.1.290.0050.00715.81
7.1.280.0050.00715.79
7.1.270.0070.00715.83
7.1.260.0060.00515.87
7.1.250.0050.00715.77
7.1.240.0030.00915.95
7.1.230.0090.00715.78
7.1.220.0040.00815.84
7.1.210.0030.01115.75
7.1.200.0040.01015.77
7.1.190.0020.00915.67
7.1.180.0040.00715.74
7.1.170.0060.00715.90
7.1.160.0100.00415.85
7.1.150.0080.00715.86
7.1.140.0030.00915.76
7.1.130.0050.00815.77
7.1.120.0060.00515.79
7.1.110.0050.00915.88
7.1.100.0040.00916.37
7.1.90.0070.00615.77
7.1.80.0050.01015.88
7.1.70.0020.01016.16
7.1.60.0060.01116.66
7.1.50.0060.00715.92
7.1.40.0010.01015.86
7.1.30.0050.00715.78
7.1.20.0060.00715.85
7.1.10.0050.00615.70
7.1.00.0040.02417.34
7.0.330.0060.00615.58
7.0.320.0050.00815.46
7.0.310.0050.00815.54
7.0.300.0070.00515.61
7.0.290.0020.01015.40
7.0.280.0070.00715.62
7.0.270.0090.00415.60
7.0.260.0030.00715.54
7.0.250.0020.01115.55
7.0.240.0070.00615.58
7.0.230.0040.00915.65
7.0.220.0080.00515.54
7.0.210.0030.00915.62
7.0.200.0020.01015.93
7.0.190.0100.00115.44
7.0.180.0030.00915.67
7.0.170.0030.00915.53
7.0.160.0070.00515.56
7.0.150.0090.00215.52
7.0.140.0050.02417.22
7.0.130.0050.01015.55
7.0.120.0100.00515.58
7.0.110.0020.01015.62
7.0.100.0070.00615.58
7.0.90.0060.00615.65
7.0.80.0050.00615.58
7.0.70.0040.00815.50
7.0.60.0060.01816.70
7.0.50.0060.02116.22
7.0.40.0070.02215.81
7.0.30.0090.02515.78
7.0.20.0090.01515.83
7.0.10.0060.02915.83
7.0.00.0060.01615.82
5.6.400.0040.00715.07
5.6.390.0060.00914.97
5.6.380.0070.00414.86
5.6.370.0060.00614.92
5.6.360.0060.00814.97
5.6.350.0040.01014.96
5.6.340.0080.00414.92
5.6.330.0080.00814.97
5.6.320.0070.00914.84
5.6.310.0040.01014.83
5.6.300.0050.01014.87
5.6.290.0050.00814.92
5.6.280.0070.02316.45
5.6.270.0090.00814.87
5.6.260.0020.01115.01
5.6.250.0020.01114.97
5.6.240.0050.00714.82
5.6.230.0060.01014.95
5.6.220.0080.00614.78
5.6.210.0080.02316.29
5.6.200.0060.02315.67
5.6.190.0070.02716.31
5.6.180.0160.02216.26
5.6.170.0090.02616.32
5.6.160.0080.01716.24
5.6.150.0040.02315.62
5.6.140.0040.02015.64
5.6.130.0090.02415.69
5.6.120.0030.01916.46
5.6.110.0030.01916.40
5.6.100.0050.03016.39
5.6.90.0060.02716.38
5.6.80.0060.01616.25
5.6.70.0070.00514.74
5.6.60.0050.00814.92
5.6.50.0060.00814.74
5.6.40.0070.00614.69
5.6.30.0080.00814.86
5.6.20.0040.00914.89
5.6.10.0040.00914.74
5.6.00.0040.00914.83
5.5.380.0040.00614.80
5.5.370.0000.01014.77
5.5.360.0090.00414.78
5.5.350.0120.02416.24
5.5.340.0050.02215.57
5.5.330.0040.02716.17
5.5.320.0150.02316.23
5.5.310.0160.01916.19
5.5.300.0050.01715.56
5.5.290.0090.02115.60
5.5.280.0050.02116.31
5.5.270.0080.02216.40
5.5.260.0100.02716.27
5.5.250.0070.02116.31
5.5.240.0110.02316.17
5.5.230.0060.00714.77
5.5.220.0070.00814.80
5.5.210.0070.00614.60
5.5.200.0060.01014.90
5.5.190.0050.00914.81
5.5.180.0090.00514.79
5.5.170.0070.00814.65
5.5.160.0060.00614.73
5.5.150.0070.00514.87
5.5.140.0030.00814.73
5.5.130.0050.00814.80
5.5.120.0060.00814.69
5.5.110.0040.00614.75
5.5.100.0050.00714.79
5.5.90.0050.00814.75
5.5.80.0040.01014.77
5.5.70.0080.00714.63
5.5.60.0070.00514.70
5.5.50.0060.00714.70
5.5.40.0070.00714.81
5.5.30.0040.00914.77
5.5.20.0060.00514.84
5.5.10.0050.00714.88
5.5.00.0050.01014.60
5.4.450.0140.01415.13
5.4.440.0110.01815.13
5.4.430.0070.01815.15
5.4.420.0100.01415.13
5.4.410.0100.01315.00
5.4.400.0130.01414.99
5.4.390.0140.01415.05
5.4.380.0180.01914.94
5.4.370.0110.01614.91
5.4.360.0140.02014.89
5.4.350.0120.01814.89
5.4.340.0150.01514.94
5.4.330.0070.00513.66
5.4.320.0040.01413.37
5.4.310.0020.01613.36
5.4.300.0050.01513.37
5.4.290.0050.01513.36
5.4.280.0060.01313.34
5.4.270.0060.01413.34
5.4.260.0030.01613.34
5.4.250.0030.01413.34
5.4.240.0040.01413.34
5.4.230.0040.01713.34
5.4.220.0060.01313.34
5.4.210.0040.01513.34
5.4.200.0050.01213.34
5.4.190.0050.01413.33
5.4.180.0040.01613.33
5.4.170.0050.01313.34
5.4.160.0070.01113.34
5.4.150.0050.01513.34
5.4.140.0030.01313.26
5.4.130.0050.01213.25
5.4.120.0050.01313.24
5.4.110.0030.01613.24
5.4.100.0060.01213.24
5.4.90.0040.01513.24
5.4.80.0050.01513.24
5.4.70.0040.01613.24
5.4.60.0050.01413.24
5.4.50.0050.01413.24
5.4.40.0020.01613.24
5.4.30.0070.01113.24
5.4.20.0020.01513.24
5.4.10.0040.01313.24
5.4.00.0040.01413.11
5.3.290.0070.04012.80
5.3.280.0110.03412.71
5.3.270.0060.04012.72
5.3.260.0100.03812.71
5.3.250.0100.03412.72
5.3.240.0090.05112.72
5.3.230.0100.03712.71
5.3.220.0070.03612.68
5.3.210.0060.04512.68
5.3.200.0120.03912.68
5.3.190.0100.03512.68
5.3.180.0050.03812.67
5.3.170.0070.03612.67
5.3.160.0060.03712.68
5.3.150.0100.03412.67
5.3.140.0110.03512.66
5.3.130.0090.03812.66
5.3.120.0090.04012.66
5.3.110.0110.03512.65
5.3.100.0060.03812.12
5.3.90.0140.03312.09
5.3.80.0110.03212.08
5.3.70.0080.03612.08
5.3.60.0050.03712.06
5.3.50.0060.03612.01
5.3.40.0110.03312.01
5.3.30.0040.04011.97
5.3.20.0070.03511.75
5.3.10.0020.03911.72
5.3.00.0060.03811.71
5.2.170.0050.0319.18
5.2.160.0030.0329.18
5.2.150.0050.0319.18
5.2.140.0090.0339.18
5.2.130.0050.0309.14
5.2.120.0070.0289.14
5.2.110.0080.0309.15
5.2.100.0050.0299.14
5.2.90.0080.0279.14
5.2.80.0070.0299.14
5.2.70.0080.0289.14
5.2.60.0050.0319.09
5.2.50.0070.0319.06
5.2.40.0040.0379.04
5.2.30.0060.0299.02
5.2.20.0100.0289.00
5.2.10.0060.0338.93
5.2.00.0060.0298.79
5.1.60.0050.0238.07
5.1.50.0060.0258.07
5.1.40.0050.0258.04
5.1.30.0050.0258.40
5.1.20.0040.0298.42
5.1.10.0060.0248.14
5.1.00.0030.0318.14
5.0.50.0040.0206.62
5.0.40.0040.0186.48
5.0.30.0040.0346.29
5.0.20.0060.0186.26
5.0.10.0040.0206.24
5.0.00.0040.0306.23
4.4.90.0040.0144.78
4.4.80.0050.0134.76
4.4.70.0030.0154.75
4.4.60.0010.0194.76
4.4.50.0010.0204.77
4.4.40.0010.0274.71
4.4.30.0050.0134.75
4.4.20.0040.0144.85
4.4.10.0030.0174.85
4.4.00.0030.0314.76
4.3.110.0040.0204.67
4.3.100.0030.0154.67
4.3.90.0050.0124.63
4.3.80.0040.0234.58
4.3.70.0030.0144.63
4.3.60.0020.0164.63
4.3.50.0030.0164.63
4.3.40.0040.0234.54
4.3.30.0010.0183.28
4.3.20.0040.0143.25
4.3.10.0020.0163.21
4.3.00.0100.01718.56

preferences:
45.22 ms | 401 KiB | 5 Q