3v4l.org

run code in 300+ PHP versions simultaneously
<?php function start( $entrance, array $route ) { $stage = []; $register = function( $on, $append ) use ( &$stage ) { if ( isset( $stage[$on] ) ) $stage[$on][] = $append; else $stage[$on] = [ $append ]; return; }; $executor = function( $step ) use ( $register, &$stage ) { if ( 1 == $step ) { $register( 3, 5 ); $register( 3, 6 ); } echo $step; }; // $register(); foreach( $route as $r ) { if ( isset( $stage[$r] ) ) foreach( $stage[$r] as $rr ) $executor( $rr ); $executor( $r ); } } start( 1, [ 1, 2, 3, 4 ] );

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.60
8.3.50.0050.01222.88
8.3.40.0040.01118.71
8.3.30.0070.00719.12
8.3.20.0040.00420.34
8.3.10.0000.00823.66
8.3.00.0080.00019.38
8.2.180.0150.00018.13
8.2.170.0000.01422.96
8.2.160.0040.01120.47
8.2.150.0070.00024.18
8.2.140.0030.00524.66
8.2.130.0060.00326.16
8.2.120.0040.00421.06
8.2.110.0090.00020.52
8.2.100.0070.00317.91
8.2.90.0080.00018.34
8.2.80.0050.00317.97
8.2.70.0060.00317.50
8.2.60.0050.00317.93
8.2.50.0090.00018.07
8.2.40.0000.00819.79
8.2.30.0040.00420.02
8.2.20.0040.00417.68
8.2.10.0080.00018.04
8.2.00.0000.00817.81
8.1.280.0090.01325.92
8.1.270.0050.00322.03
8.1.260.0050.00226.35
8.1.250.0080.00028.09
8.1.240.0030.00622.04
8.1.230.0040.00822.11
8.1.220.0000.00817.91
8.1.210.0030.00618.88
8.1.200.0060.00317.48
8.1.190.0040.00417.35
8.1.180.0000.00918.10
8.1.170.0080.00018.65
8.1.160.0000.00722.01
8.1.150.0040.00418.83
8.1.140.0070.00017.46
8.1.130.0030.00317.84
8.1.120.0000.00717.51
8.1.110.0000.00817.54
8.1.100.0000.00717.50
8.1.90.0040.00417.41
8.1.80.0040.00417.52
8.1.70.0030.00317.48
8.1.60.0030.00617.49
8.1.50.0000.00917.59
8.1.40.0040.00417.39
8.1.30.0090.00017.49
8.1.20.0030.00517.57
8.1.10.0080.00017.55
8.1.00.0000.00817.54
8.0.300.0030.00619.89
8.0.290.0040.00416.63
8.0.280.0000.00718.47
8.0.270.0050.00317.26
8.0.260.0030.00318.46
8.0.250.0000.00716.99
8.0.240.0030.00316.96
8.0.230.0000.00616.82
8.0.220.0000.00816.91
8.0.210.0040.00416.90
8.0.200.0000.00716.82
8.0.190.0030.00316.94
8.0.180.0080.00016.91
8.0.170.0030.00616.99
8.0.160.0030.00316.84
8.0.150.0040.00416.79
8.0.140.0030.00616.81
8.0.130.0050.00013.31
8.0.120.0040.00416.91
8.0.110.0060.00316.95
8.0.100.0020.00516.79
8.0.90.0000.00716.88
8.0.80.0070.00716.78
8.0.70.0040.00416.79
8.0.60.0040.00416.89
8.0.50.0000.00716.93
8.0.30.0110.00817.13
8.0.20.0150.00317.40
8.0.10.0040.00416.89
8.0.00.0100.00916.78
7.4.330.0030.00315.10
7.4.320.0030.00316.62
7.4.300.0070.00016.61
7.4.290.0000.00716.63
7.4.280.0040.00416.57
7.4.270.0000.00716.60
7.4.260.0030.00316.61
7.4.250.0000.00716.53
7.4.240.0060.00216.57
7.4.230.0040.00416.68
7.4.220.0150.00916.62
7.4.210.0030.01316.55
7.4.200.0000.00816.61
7.4.160.0080.00816.46
7.4.150.0080.01017.40
7.4.140.0070.01017.86
7.4.130.0110.00916.56
7.4.120.0120.00916.54
7.4.110.0090.00916.65
7.4.100.0030.01316.57
7.4.90.0030.01316.64
7.4.80.0170.00719.39
7.4.70.0110.00716.57
7.4.60.0100.00616.50
7.4.50.0060.00316.33
7.4.40.0160.00616.39
7.4.30.0110.00516.41
7.4.00.0150.00015.03
7.3.330.0030.00613.14
7.3.320.0060.00013.37
7.3.310.0030.00316.48
7.3.300.0050.00216.20
7.3.290.0030.01016.42
7.3.280.0090.00816.38
7.3.270.0110.00917.40
7.3.260.0240.00016.47
7.3.250.0110.00616.55
7.3.240.0130.01216.46
7.3.230.0130.00316.51
7.3.210.0000.01816.40
7.3.200.0100.01019.39
7.3.190.0060.00916.28
7.3.180.0130.01016.36
7.3.170.0060.00916.44
7.3.160.0060.00916.38
7.3.00.0110.00516.80
7.2.330.0140.00316.68
7.2.320.0100.01316.53
7.2.310.0130.01016.58
7.2.300.0130.00316.86
7.2.290.0110.00716.86
7.2.130.0100.01016.92
7.2.120.0040.01116.89
7.2.110.0120.00316.93
7.2.100.0080.00616.77
7.2.90.0070.01116.76
7.2.80.0100.01016.52
7.2.70.0100.00316.98
7.2.60.0140.00316.73
7.2.50.0030.01016.70
7.2.40.0060.00917.00
7.2.30.0080.00516.68
7.2.20.0090.00916.74
7.2.10.0000.01017.04
7.2.00.0050.00918.11
7.1.250.0100.00315.53
7.1.240.0120.00815.44
7.1.230.0000.01315.76
7.1.220.0090.00615.88
7.1.210.0090.00615.65
7.1.200.0070.00715.83
7.1.190.0090.00415.58
7.1.180.0070.00515.82
7.1.170.0130.00715.77
7.1.160.0060.00915.79
7.1.150.0110.00615.71
7.1.140.0120.00615.47
7.1.130.0090.00515.66
7.1.120.0070.00715.78
7.1.110.0120.00415.71
7.1.100.0100.00016.81
7.1.90.0120.00615.76
7.1.80.0110.00715.87
7.1.70.0080.00616.47
7.1.60.0130.00717.35
7.1.50.0070.01216.44
7.1.40.0180.00415.85
7.1.30.0040.00815.60
7.1.20.0080.00815.66
7.1.10.0170.00015.62
7.1.00.0070.04019.05
7.0.330.0100.00315.29
7.0.320.0090.00315.14
7.0.310.0090.00715.32
7.0.300.0090.00015.30
7.0.290.0040.01115.24
7.0.280.0080.00415.23
7.0.270.0080.00815.46
7.0.260.0120.00415.38
7.0.250.0100.01015.44
7.0.240.0050.01015.25
7.0.230.0170.00315.16
7.0.220.0110.00915.59
7.0.210.0090.00915.22
7.0.200.0080.00316.04
7.0.190.0100.00715.46
7.0.180.0120.00315.25
7.0.170.0040.01615.31
7.0.160.0120.00415.18
7.0.150.0030.01215.13
7.0.140.0060.04218.75
7.0.130.0030.01015.52
7.0.120.0060.00615.51
7.0.110.0000.00915.30
7.0.100.0000.00915.49
7.0.90.0030.01015.27
7.0.80.0060.00615.67
7.0.70.0040.01115.24
7.0.60.0040.02717.83
7.0.50.0120.01716.56
7.0.40.0120.04016.79
7.0.30.0180.03816.96
7.0.20.0170.04316.81
7.0.10.0060.04316.86
7.0.00.0050.04916.86
5.6.380.0000.01414.36
5.6.370.0050.00914.29
5.6.360.0080.00414.18
5.6.350.0060.00414.20
5.6.340.0050.01014.32
5.6.330.0040.00814.45
5.6.320.0070.01013.94
5.6.310.0090.00614.46
5.6.300.0100.00614.17
5.6.290.0110.00014.45
5.6.280.0050.04117.73
5.6.270.0030.00614.02
5.6.260.0030.00914.17
5.6.250.0070.00714.61
5.6.240.0000.00914.58
5.6.230.0060.00314.63
5.6.220.0040.00814.21
5.6.210.0060.04417.38
5.6.200.0030.04516.47
5.6.190.0090.03717.43
5.6.180.0200.04317.27
5.6.170.0100.02417.44
5.6.160.0070.03517.45
5.6.150.0050.03416.36
5.6.140.0080.03116.19
5.6.130.0030.02616.10
5.6.120.0070.02317.55
5.6.110.0150.04217.69
5.6.100.0030.03017.61
5.6.90.0050.04417.69
5.6.80.0080.04217.33
5.6.70.0050.00614.26
5.6.60.0080.00414.42
5.6.50.0080.00514.33
5.6.40.0070.00314.39
5.6.30.0090.00314.07
5.6.20.0000.01514.38
5.6.10.0030.00614.28
5.6.00.0030.01214.32
5.5.380.0040.00411.19
5.5.370.0000.01210.92
5.5.360.0000.00811.19
5.5.350.0130.04415.73
5.5.340.0050.03214.71
5.5.330.0030.02415.71
5.5.320.0200.02515.86
5.5.310.0120.02915.67
5.5.300.0060.02414.60
5.5.290.0030.04514.68
5.5.280.0100.03815.90
5.5.270.0030.04716.16
5.5.260.0120.03815.93
5.5.250.0070.04215.93
5.5.240.0150.03315.72
5.5.230.0030.00611.52
5.5.220.0020.00710.82
5.5.210.0040.00411.34
5.5.200.0000.00811.16
5.5.190.0030.00310.97
5.5.180.0040.00711.08
5.5.170.0090.00310.96
5.5.160.0070.00311.40
5.5.150.0000.00611.46
5.5.140.0060.00311.42
5.5.130.0000.00911.32
5.5.120.0000.00611.12
5.5.110.0080.00011.27
5.5.100.0040.00411.22
5.5.90.0080.00411.16
5.5.80.0080.00011.30
5.5.70.0080.00411.31
5.5.60.0080.00611.27
5.5.50.0040.00411.25
5.5.40.0030.00310.87
5.5.30.0060.00611.40
5.5.20.0050.00311.38
5.5.10.0060.00011.05
5.5.00.0030.00311.20
5.4.450.0200.02715.37
5.4.440.0530.01715.33
5.4.430.0220.02215.06
5.4.420.0070.02515.09
5.4.410.0190.02315.25
5.4.400.0140.02315.02
5.4.390.0120.02515.06
5.4.380.0230.02814.74
5.4.370.0220.03214.83
5.4.360.0120.03114.86
5.4.350.0120.03914.75
5.4.340.0230.02714.86
5.4.330.0000.00610.91
5.4.320.0050.02311.76
5.4.310.0050.02211.74
5.4.300.0100.02211.90
5.4.290.0050.02211.82
5.4.280.0050.01911.64
5.4.270.0080.01611.73
5.4.260.0050.02311.55
5.4.250.0050.02211.62
5.4.240.0050.02111.68
5.4.230.0020.02311.69
5.4.220.0030.02211.63
5.4.210.0030.02111.58
5.4.200.0040.02011.67
5.4.190.0050.02011.66
5.4.180.0060.01911.70
5.4.170.0060.02011.59
5.4.160.0040.02111.84
5.4.150.0060.01911.80
5.4.140.0030.02111.51
5.4.130.0050.02011.49
5.4.120.0040.02011.36
5.4.110.0060.02111.47
5.4.100.0050.02011.51
5.4.90.0030.02111.49
5.4.80.0050.01911.39
5.4.70.0040.02311.55
5.4.60.0040.02011.37
5.4.50.0050.02011.58
5.4.40.0070.01811.66
5.4.30.0070.02411.61
5.4.20.0040.01911.43
5.4.10.0040.01911.37
5.4.00.0050.01811.26
5.3.290.0040.02211.47
5.3.280.0040.02111.35
5.3.270.0060.02011.36
5.3.260.0020.02211.52
5.3.250.0040.02111.53
5.3.240.0060.02311.47
5.3.230.0040.02311.39
5.3.220.0050.02311.31
5.3.210.0030.02311.46
5.3.200.0040.02111.48
5.3.190.0050.02511.51
5.3.180.0070.01911.57
5.3.170.0030.02511.57
5.3.160.0040.02211.49
5.3.150.0040.02411.57
5.3.140.0040.02311.53
5.3.130.0060.01811.54
5.3.120.0040.02711.39
5.3.110.0070.02211.39
5.3.100.0060.02411.13
5.3.90.0060.02011.27
5.3.80.0070.02011.08
5.3.70.0060.01911.20
5.3.60.0040.02311.22
5.3.50.0070.02011.16
5.3.40.0040.02211.12
5.3.30.0020.02211.01
5.3.20.0040.02511.02
5.3.10.0070.02110.93
5.3.00.0050.01810.89
5.2.170.0050.0209.31
5.2.160.0050.0219.31
5.2.150.0070.0199.31
5.2.140.0040.0199.31
5.2.130.0060.0169.29
5.2.120.0050.0149.30
5.2.110.0060.0169.30
5.2.100.0030.0199.29
5.2.90.0070.0209.29
5.2.80.0040.0189.29
5.2.70.0080.0189.29
5.2.60.0070.0169.27
5.2.50.0060.0159.26
5.2.40.0020.0199.24
5.2.30.0020.0189.23
5.2.20.0020.0209.23
5.2.10.0020.0179.18
5.2.00.0020.0169.11
5.1.60.0050.0178.75
5.1.50.0030.0178.75
5.1.40.0050.0158.74
5.1.30.0020.0198.92
5.1.20.0020.0188.93
5.1.10.0080.0158.79
5.1.00.0040.0158.79
5.0.50.0030.0138.03
5.0.40.0040.0157.96
5.0.30.0020.0227.86
5.0.20.0020.0177.85
5.0.10.0070.0157.83
5.0.00.0030.0237.83
4.4.90.0020.0117.10
4.4.80.0040.0077.08
4.4.70.0030.0087.09
4.4.60.0020.0097.08
4.4.50.0040.0097.09
4.4.40.0020.0147.06
4.4.30.0020.0107.09
4.4.20.0020.0107.13
4.4.10.0030.0107.13
4.4.00.0020.0157.09
4.3.110.0010.0117.04
4.3.100.0020.0107.04
4.3.90.0020.0097.03
4.3.80.0030.0147.00
4.3.70.0030.0087.02
4.3.60.0030.0087.02
4.3.50.0020.0107.02
4.3.40.0020.0146.97
4.3.30.0010.0136.36
4.3.20.0010.0116.35
4.3.10.0020.0096.33
4.3.00.0060.00912.53

preferences:
58.28 ms | 401 KiB | 5 Q