3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ncarts = 3; $quantidade_sorteada = 3; $numeros_cartela[1] = array(1, 3); $numeros_cartela[2] = array (5, 7); $numeros_cartela[3] = array(9, 11); $sorted[1] = 1; $sorted[2] = 3; $sorted[3] = 5; for ($p=1; $p<=$ncarts; $p++) { $contador_pontos_cartela[$p] = 0; for ($g=1; $g<=$quantidade_sorteada; $g++) { foreach ($numeros_cartela[$p] as $w) { echo "Valor de w: {$w} <br>"; echo "Valor de sorted: {$sorted[$g]} <br>"; if ($w == $sorted[$g]){ echo "truue"; $contador_pontos_cartela[$p] += 1; } } } }

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.01516.61
8.3.50.0070.01421.98
8.3.40.0110.00418.66
8.3.30.0160.00619.17
8.3.20.0120.00320.16
8.3.10.0040.00423.62
8.3.00.0040.00420.58
8.2.180.0090.00916.50
8.2.170.0070.00722.96
8.2.160.0070.00722.13
8.2.150.0070.00724.18
8.2.140.0050.00324.66
8.2.130.0050.00326.16
8.2.120.0050.00322.16
8.2.110.0070.00322.11
8.2.100.0000.01217.97
8.2.90.0000.00919.21
8.2.80.0040.00417.97
8.2.70.0030.00717.63
8.2.60.0050.00318.04
8.2.50.0080.00018.07
8.2.40.0040.00419.38
8.2.30.0060.00318.13
8.2.20.0080.00017.71
8.2.10.0000.00719.58
8.2.00.0040.00417.75
8.1.280.0140.00425.92
8.1.270.0090.00023.84
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0060.00323.85
8.1.230.0080.00418.89
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0030.00617.36
8.1.190.0000.00817.53
8.1.180.0040.00418.10
8.1.170.0000.00818.38
8.1.160.0050.00322.07
8.1.150.0070.00018.55
8.1.140.0040.00417.41
8.1.130.0000.00717.74
8.1.120.0000.00717.36
8.1.110.0040.00417.41
8.1.100.0000.00717.50
8.1.90.0040.00417.33
8.1.80.0070.00017.47
8.1.70.0000.00717.41
8.1.60.0030.00617.47
8.1.50.0030.00617.57
8.1.40.0080.00017.56
8.1.30.0040.00417.56
8.1.20.0040.00417.68
8.1.10.0030.00517.42
8.1.00.0050.00317.56
8.0.300.0040.00418.77
8.0.290.0040.00417.04
8.0.280.0000.00818.36
8.0.270.0030.00317.17
8.0.260.0030.00316.83
8.0.250.0030.00316.83
8.0.240.0000.00816.95
8.0.230.0040.00416.99
8.0.220.0020.00516.91
8.0.210.0030.00316.95
8.0.200.0030.00516.84
8.0.190.0100.00016.87
8.0.180.0070.00016.97
8.0.170.0070.00016.98
8.0.160.0000.00817.02
8.0.150.0050.00516.90
8.0.140.0030.00316.86
8.0.130.0000.00513.29
8.0.120.0000.00816.75
8.0.110.0000.00716.93
8.0.100.0000.00716.85
8.0.90.0030.00516.96
8.0.80.0130.00316.88
8.0.70.0000.00717.02
8.0.60.0000.00716.90
8.0.50.0000.00716.79
8.0.30.0130.00717.08
8.0.20.0110.00717.40
8.0.10.0050.00216.84
8.0.00.0090.00916.76
7.4.330.0050.00015.00
7.4.320.0000.00716.59
7.4.300.0030.00316.49
7.4.290.0000.00816.49
7.4.280.0030.00316.57
7.4.270.0030.00316.65
7.4.260.0000.00716.45
7.4.250.0040.00416.56
7.4.240.0040.00416.59
7.4.230.0030.00316.69
7.4.220.0030.01316.47
7.4.210.0050.01016.45
7.4.200.0000.00716.69
7.4.190.0040.00316.61
7.4.160.0110.01116.55
7.4.150.0110.00717.40
7.4.140.0060.01417.86
7.4.130.0110.00716.48
7.4.120.0050.01216.37
7.4.110.0140.00316.54
7.4.100.0100.01016.38
7.4.90.0150.00316.55
7.4.80.0200.02216.43
7.4.70.0000.01716.52
7.4.60.0130.00316.44
7.4.50.0050.00316.60
7.4.40.0120.00222.77
7.4.30.0130.00316.58
7.4.10.0040.01514.97
7.4.00.0050.01214.92
7.3.330.0000.00513.05
7.3.320.0060.00013.22
7.3.310.0070.00016.10
7.3.300.0000.00616.31
7.3.290.0070.00716.36
7.3.280.0050.01016.35
7.3.270.0070.01017.40
7.3.260.0130.01016.28
7.3.250.0070.01116.36
7.3.240.0080.00816.39
7.3.230.0100.00716.39
7.3.210.0130.00616.70
7.3.200.0030.01819.39
7.3.190.0030.01316.34
7.3.180.0070.01016.48
7.3.170.0100.01016.57
7.3.160.0120.00316.29
7.3.130.0000.01914.90
7.3.120.0110.00615.01
7.3.110.0130.00314.91
7.3.100.0040.01214.67
7.3.90.0060.01214.82
7.3.80.0080.00414.93
7.3.70.0000.01414.54
7.3.60.0040.01114.86
7.3.50.0060.01214.58
7.3.40.0000.01514.91
7.3.30.0030.00614.81
7.3.20.0060.00916.58
7.3.10.0090.00316.71
7.3.00.0050.00516.72
7.2.330.0160.00316.43
7.2.320.0080.00816.83
7.2.310.0100.01116.70
7.2.300.0060.01216.78
7.2.290.0080.00816.57
7.2.260.0040.01515.15
7.2.250.0090.00915.10
7.2.240.0070.00714.85
7.2.230.0070.01415.19
7.2.220.0080.00915.33
7.2.210.0070.01015.23
7.2.200.0070.00715.19
7.2.190.0030.01715.07
7.2.180.0070.01015.02
7.2.170.0040.01515.22
7.2.160.0070.00714.97
7.2.150.0030.01416.92
7.2.140.0040.00417.06
7.2.130.0070.00916.89
7.2.120.0040.01016.92
7.2.110.0070.00516.96
7.2.100.0080.00716.82
7.2.90.0020.01416.92
7.2.80.0060.01017.02
7.2.70.0000.01316.93
7.2.60.0020.01116.97
7.2.50.0060.00617.02
7.2.40.0020.01317.03
7.2.30.0080.00616.98
7.2.20.0050.01216.96
7.2.10.0050.01016.89
7.2.00.0090.00517.74
7.1.330.0030.01015.45
7.1.320.0120.00315.77
7.1.310.0000.01315.84
7.1.300.0060.01215.63
7.1.290.0040.01115.68
7.1.280.0100.00315.75
7.1.270.0030.01015.66
7.1.260.0000.01115.77
7.1.250.0050.00715.85
7.1.240.0040.01115.72
7.1.230.0040.00715.59
7.1.220.0100.00715.92
7.1.210.0040.01215.79
7.1.200.0050.00815.89
7.1.190.0060.00615.76
7.1.180.0000.01415.79
7.1.170.0060.00915.71
7.1.160.0040.00815.87
7.1.150.0030.00615.82
7.1.140.0070.00715.91
7.1.130.0030.01315.91
7.1.120.0040.01115.92
7.1.110.0040.00415.75
7.1.100.0050.00916.88
7.1.90.0000.01115.74
7.1.80.0080.00815.80
7.1.70.0050.00716.51
7.1.60.0070.01017.58
7.1.50.0070.00916.42
7.1.40.0000.00915.94
7.1.30.0030.01315.82
7.1.20.0060.01215.94
7.1.10.0000.01015.83
7.1.00.0060.04119.22
7.0.330.0000.01215.30
7.0.320.0060.01215.23
7.0.310.0040.01215.44
7.0.300.0060.00315.57
7.0.290.0070.00715.61
7.0.280.0060.01015.60
7.0.270.0060.00615.42
7.0.260.0060.00615.35
7.0.250.0070.01015.53
7.0.240.0000.01015.58
7.0.230.0040.00815.58
7.0.220.0040.00715.46
7.0.210.0030.01115.47
7.0.200.0040.00915.97
7.0.190.0080.00415.45
7.0.180.0060.00615.34
7.0.170.0000.01415.41
7.0.160.0100.00715.52
7.0.150.0000.01115.40
7.0.140.0000.04318.77
7.0.130.0080.00015.37
7.0.120.0030.00615.53
7.0.110.0000.01215.53
7.0.100.0140.00015.45
7.0.90.0090.00315.40
7.0.80.0070.00715.61
7.0.70.0030.01015.26
7.0.60.0160.03617.63
7.0.50.0080.04216.68
7.0.40.0100.04316.87
7.0.30.0210.03816.89
7.0.20.0180.03916.91
7.0.10.0180.03916.91
7.0.00.0050.02516.94
5.6.400.0000.01514.14
5.6.390.0030.01014.40
5.6.380.0030.01414.86
5.6.370.0110.00314.69
5.6.360.0030.00814.65
5.6.350.0000.01214.58
5.6.340.0090.00614.62
5.6.330.0070.00414.55
5.6.320.0100.00714.23
5.6.310.0040.01114.43
5.6.300.0120.00314.39
5.6.290.0060.00314.41
5.6.280.0050.04017.91
5.6.270.0060.00614.54
5.6.260.0080.00314.35
5.6.250.0070.00414.35
5.6.240.0000.01814.35
5.6.230.0030.01014.45
5.6.220.0000.01614.46
5.6.210.0040.04817.41
5.6.200.0130.04316.37
5.6.190.0100.02317.58
5.6.180.0080.02317.39
5.6.170.0180.04517.60
5.6.160.0070.04317.51
5.6.150.0070.02816.32
5.6.140.0100.04216.43
5.6.130.0050.04116.21
5.6.120.0100.03017.59
5.6.110.0130.02817.76
5.6.100.0060.04517.70
5.6.90.0070.04517.79
5.6.80.0050.03017.35
5.6.70.0000.01414.22
5.6.60.0100.00714.22
5.6.50.0080.00314.37
5.6.40.0030.00714.11
5.6.30.0000.01414.39
5.6.20.0000.01414.42
5.6.10.0040.01114.30
5.6.00.0030.00914.24
5.5.380.0070.00314.55
5.5.370.0060.00614.18
5.5.360.0030.01014.61
5.5.350.0170.04017.34
5.5.340.0000.02616.32
5.5.330.0080.02217.47
5.5.320.0100.02717.57
5.5.310.0220.04217.44
5.5.300.0090.02316.17
5.5.290.0050.04416.21
5.5.280.0030.03017.57
5.5.270.0120.03017.56
5.5.260.0080.04517.61
5.5.250.0070.03617.57
5.5.240.0130.04017.41
5.5.230.0040.01214.16
5.5.220.0070.01114.46
5.5.210.0000.01214.13
5.5.200.0090.00614.18
5.5.190.0070.00714.51
5.5.180.0030.01014.40
5.5.170.0060.00314.13
5.5.160.0000.00914.35
5.5.150.0100.00714.15
5.5.140.0130.00014.48
5.5.130.0000.00914.05
5.5.120.0030.00614.17
5.5.110.0070.00714.27
5.5.100.0120.00314.39
5.5.90.0000.01214.55
5.5.80.0000.01614.55
5.5.70.0030.00914.49
5.5.60.0110.00314.45
5.5.50.0070.00714.25
5.5.40.0030.01414.34
5.5.30.0000.00914.39
5.5.20.0040.01114.55
5.5.10.0140.00014.52
5.5.00.0000.01213.89
5.4.450.0150.03115.62
5.4.440.0050.03715.52
5.4.430.0110.02615.55
5.4.420.0350.00415.70
5.4.410.0100.02915.48
5.4.400.0090.03115.31
5.4.390.0140.03315.23
5.4.380.0120.03215.32
5.4.370.0070.03015.21
5.4.360.0310.02215.29
5.4.350.0030.02311.96
5.4.340.0040.02111.96
5.4.330.0040.00811.96
5.4.320.0040.02012.21
5.4.310.0020.02612.21
5.4.300.0060.02012.21
5.4.290.0030.02412.21
5.4.280.0040.02812.14
5.4.270.0080.02212.14
5.4.260.0040.02812.14
5.4.250.0050.02312.14
5.4.240.0070.02212.14
5.4.230.0060.02112.13
5.4.220.0050.02112.14
5.4.210.0080.02112.13
5.4.200.0100.02012.14
5.4.190.0060.02312.13
5.4.180.0060.02012.13
5.4.170.0050.02312.14
5.4.160.0060.02212.14
5.4.150.0090.02212.14
5.4.140.0060.02911.98
5.4.130.0080.01811.97
5.4.120.0070.02311.95
5.4.110.0040.02111.95
5.4.100.0040.02111.95
5.4.90.0050.02111.95
5.4.80.0050.02811.95
5.4.70.0050.02511.95
5.4.60.0050.02211.95
5.4.50.0070.01811.95
5.4.40.0020.02411.94
5.4.30.0040.02111.94
5.4.20.0070.02011.94
5.4.10.0050.02111.94
5.4.00.0050.02311.68
5.3.290.0020.02512.38
5.3.280.0060.02412.33
5.3.270.0040.02712.34
5.3.260.0080.02012.34
5.3.250.0050.02712.34
5.3.240.0070.02212.34
5.3.230.0060.02412.33
5.3.220.0070.02112.32
5.3.210.0050.02512.32
5.3.200.0060.02012.32
5.3.190.0050.02312.31
5.3.180.0070.01912.31
5.3.170.0090.01912.31
5.3.160.0060.02212.31
5.3.150.0060.02112.31
5.3.140.0080.02112.31
5.3.130.0100.02412.31
5.3.120.0040.02712.31
5.3.110.0060.02412.31
5.3.100.0060.02112.04
5.3.90.0040.02412.02
5.3.80.0080.02012.02
5.3.70.0040.02312.02
5.3.60.0040.03012.01
5.3.50.0060.02111.98
5.3.40.0050.02311.98
5.3.30.0050.02811.95
5.3.20.0070.02011.83
5.3.10.0070.02311.81
5.3.00.0060.02311.81
5.2.170.0060.0329.15
5.2.160.0060.0319.15
5.2.150.0060.0339.16
5.2.140.0080.0409.15
5.2.130.0080.0399.11
5.2.120.0120.0349.11
5.2.110.0110.0349.12
5.2.100.0050.0419.12
5.2.90.0040.0439.11
5.2.80.0110.0369.12
5.2.70.0090.0399.11
5.2.60.0090.0419.07
5.2.50.0080.0429.04
5.2.40.0110.0349.01
5.2.30.0060.0448.99
5.2.20.0050.0398.98
5.2.10.0080.0368.92
5.2.00.0070.0398.79
5.1.60.0090.0308.07
5.1.50.0060.0358.07
5.1.40.0150.0348.05
5.1.30.0090.0378.40
5.1.20.0080.0348.43
5.1.10.0040.0298.15
5.1.00.0050.0268.15
5.0.50.0030.0236.63
5.0.40.0030.0206.50
5.0.30.0050.0336.30
5.0.20.0050.0246.27
5.0.10.0110.0176.25
5.0.00.0050.0306.24
4.4.90.0040.0154.78
4.4.80.0030.0164.75
4.4.70.0040.0154.75
4.4.60.0040.0154.75
4.4.50.0030.0154.77
4.4.40.0050.0254.71
4.4.30.0030.0184.76
4.4.20.0030.0174.84
4.4.10.0030.0164.85
4.4.00.0020.0264.75
4.3.110.0030.0164.66
4.3.100.0010.0174.66
4.3.90.0030.0174.64
4.3.80.0060.0234.58
4.3.70.0030.0154.63
4.3.60.0030.0154.63
4.3.50.0050.0154.63
4.3.40.0030.0254.54
4.3.30.0010.0173.29
4.3.20.0020.0243.28
4.3.10.0040.0173.24
4.3.00.0030.0207.03

preferences:
39.64 ms | 400 KiB | 5 Q