3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "mama"; $array = array ( 1 => "a", 2 => "b", 3=> "c", ); $andra = array( 1=>12, 3=>14); $andra[]=56; $nr=count($array); for($i=1;$i<$nr;$i++){ echo "eu si tu : {$array[$i]}\n"; } var_dump($array); class eu { function do_eu(){ echo " eu eu eu \n"; } } $nou = new eu; $nou ->do_eu(); print (new eu)->a ; function a( $array ){ foreach( $array as $key => $value ){ if( is_array( $value ) ) $array[ $key ] = a( $value ); } return (object) $array; } function bebe( $andra ) { foreach( $andra as $key => $value) { if(is_array($value) ) $andra[$key]= bebe($value); } return(object) $andra; } $eee = (object) array( 'foo' => (object) array( 'bar' => 'baz', 'pax' => 'vax' ), 'moo' => 'ui' ); print $eee->foo->bar; ?>

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.01118.68
8.3.50.0250.00622.11
8.3.40.0070.00719.00
8.3.30.0000.01320.21
8.3.20.0040.00420.29
8.3.10.0030.00622.12
8.3.00.0040.00422.52
8.2.180.0130.01016.63
8.2.170.0140.00422.96
8.2.160.0030.01022.22
8.2.150.0120.00324.18
8.2.140.0080.00024.66
8.2.130.0090.00026.16
8.2.120.0070.00317.75
8.2.110.0060.00322.11
8.2.100.0120.00017.91
8.2.90.0040.00419.26
8.2.80.0000.00819.32
8.2.70.0050.00317.75
8.2.60.0000.00917.80
8.2.50.0080.00018.07
8.2.40.0000.00818.22
8.2.30.0030.00518.14
8.2.20.0040.00417.74
8.2.10.0040.00417.83
8.2.00.0040.00417.89
8.1.280.0110.00725.92
8.1.270.0070.00324.66
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0070.00323.97
8.1.230.0000.01219.07
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0040.00417.25
8.1.190.0050.00317.52
8.1.180.0080.00019.01
8.1.170.0040.00418.62
8.1.160.0040.00418.91
8.1.150.0000.00718.66
8.1.140.0000.00817.47
8.1.130.0040.00417.74
8.1.120.0000.00817.52
8.1.110.0040.00417.48
8.1.100.0050.00317.49
8.1.90.0050.00317.49
8.1.80.0000.00817.49
8.1.70.0000.00817.36
8.1.60.0030.00617.62
8.1.50.0000.00817.44
8.1.40.0040.00417.54
8.1.30.0000.00717.67
8.1.20.0030.00517.51
8.1.10.0040.00417.53
8.1.00.0000.01017.50
8.0.300.0040.00418.77
8.0.290.0040.00417.02
8.0.280.0030.00318.47
8.0.270.0030.00317.34
8.0.260.0030.00316.91
8.0.250.0000.00817.04
8.0.240.0030.00617.02
8.0.230.0030.00316.92
8.0.220.0000.00716.95
8.0.210.0040.00417.01
8.0.200.0000.00717.07
8.0.190.0030.00616.91
8.0.180.0070.00016.94
8.0.170.0050.00317.01
8.0.160.0030.00617.00
8.0.150.0030.00416.90
8.0.140.0040.00416.83
8.0.130.0040.00413.45
8.0.120.0040.00416.80
8.0.110.0000.00716.99
8.0.100.0070.00016.95
8.0.90.0040.00417.07
8.0.80.0000.02116.98
8.0.70.0080.00016.85
8.0.60.0030.00517.03
8.0.50.0000.00716.87
8.0.30.0120.00817.17
8.0.20.0140.00517.46
8.0.10.0040.00417.11
8.0.00.0120.00516.78
7.4.330.0000.00515.09
7.4.320.0030.00316.60
7.4.300.0000.00616.53
7.4.290.0000.00616.43
7.4.280.0000.00716.62
7.4.270.0040.00416.50
7.4.260.0000.00513.32
7.4.250.0000.00816.61
7.4.240.0040.00316.55
7.4.230.0030.00316.61
7.4.220.0090.00916.58
7.4.210.0110.00616.58
7.4.200.0000.00716.52
7.4.190.0000.00716.45
7.4.160.0070.01016.52
7.4.150.0140.00417.40
7.4.140.0100.00817.86
7.4.130.0050.01316.57
7.4.120.0100.00816.56
7.4.110.0140.00316.54
7.4.100.0090.00916.63
7.4.90.0030.01416.51
7.4.80.0130.00619.39
7.4.70.0060.01516.58
7.4.60.0100.00716.46
7.4.50.0050.00316.40
7.4.40.0060.00922.77
7.4.30.0060.01016.66
7.4.10.0100.00715.12
7.4.00.0080.00915.06
7.3.330.0030.00313.40
7.3.320.0000.00513.41
7.3.310.0040.00416.29
7.3.300.0040.00416.40
7.3.290.0100.01216.43
7.3.280.0070.01016.40
7.3.270.0090.01017.40
7.3.260.0130.00516.73
7.3.250.0080.01016.55
7.3.240.0170.00316.52
7.3.230.0210.00316.54
7.3.210.0060.01116.43
7.3.200.0160.00319.39
7.3.190.0100.01016.59
7.3.180.0090.00916.64
7.3.170.0060.01016.57
7.3.160.0030.01616.62
7.3.130.0040.01514.61
7.3.120.0060.00914.75
7.3.110.0060.01114.86
7.3.100.0070.00914.77
7.3.90.0110.00514.92
7.3.80.0070.00514.80
7.3.70.0060.00914.85
7.3.60.0030.01014.99
7.3.50.0060.00814.90
7.3.40.0060.00614.82
7.3.30.0070.00514.99
7.3.20.0070.00916.67
7.3.10.0070.00916.50
7.3.00.0120.00616.75
7.2.330.0040.01216.77
7.2.320.0130.00316.78
7.2.310.0150.00616.70
7.2.300.0170.00616.86
7.2.290.0090.00816.86
7.2.260.0100.01015.04
7.2.250.0050.01115.01
7.2.240.0070.01015.22
7.2.230.0020.01515.27
7.2.220.0060.00915.21
7.2.210.0090.00615.00
7.2.200.0060.00415.14
7.2.190.0070.00814.99
7.2.180.0060.00715.11
7.2.170.0020.00915.16
7.2.160.0090.00614.96
7.2.150.0030.01217.14
7.2.140.0000.01416.80
7.2.130.0150.00416.75
7.2.120.0040.01116.77
7.2.110.0090.00616.85
7.2.100.0050.01016.90
7.2.90.0100.00716.82
7.2.80.0140.00517.00
7.2.70.0080.00816.78
7.2.60.0070.00516.80
7.2.50.0100.00916.82
7.2.40.0050.00816.97
7.2.30.0050.00716.80
7.2.20.0100.00716.73
7.2.10.0040.01116.91
7.2.00.0030.01317.00
7.1.330.0050.01015.94
7.1.320.0050.00615.93
7.1.310.0070.00615.85
7.1.300.0080.00715.62
7.1.290.0030.00915.71
7.1.280.0010.01215.72
7.1.270.0070.00315.84
7.1.260.0030.01215.68
7.1.250.0090.00715.72
7.1.240.0030.01015.99
7.1.230.0040.00715.80
7.1.220.0070.00715.77
7.1.210.0100.00315.99
7.1.200.0040.01115.98
7.1.190.0030.00915.81
7.1.180.0000.01115.77
7.1.170.0100.00615.87
7.1.160.0070.00415.65
7.1.150.0000.01515.77
7.1.140.0040.01115.68
7.1.130.0030.01315.46
7.1.120.0030.01015.78
7.1.110.0090.00015.91
7.1.100.0030.01215.58
7.1.90.0060.01016.04
7.1.80.0080.00415.96
7.1.70.0070.00516.58
7.1.60.0050.00516.46
7.1.50.0110.01525.18
7.1.40.0120.00415.90
7.1.30.0040.01215.78
7.1.20.0030.01015.85
7.1.10.0060.00615.52
7.1.00.0050.04119.14
7.0.330.0140.00015.24
7.0.320.0070.00715.21
7.0.310.0030.00715.60
7.0.300.0080.00515.51
7.0.290.0130.00015.40
7.0.280.0000.00815.51
7.0.270.0020.01315.57
7.0.260.0030.00815.44
7.0.250.0030.00915.23
7.0.240.0040.00715.42
7.0.230.0090.00715.57
7.0.220.0060.00615.45
7.0.210.0070.00715.47
7.0.200.0070.00816.12
7.0.190.0030.01115.60
7.0.180.0040.01215.50
7.0.170.0070.00315.53
7.0.160.0030.01015.44
7.0.150.0000.01115.19
7.0.140.0020.04018.85
7.0.130.0060.01015.14
7.0.120.0040.00715.19
7.0.110.0030.01015.45
7.0.100.0070.04317.75
7.0.90.0030.04417.62
7.0.80.0100.03817.71
7.0.70.0070.04217.65
7.0.60.0030.02417.73
7.0.50.0110.04217.83
7.0.40.0030.04516.80
7.0.30.0030.02716.85
7.0.20.0070.04516.71
7.0.10.0100.04116.86
7.0.00.0070.04616.68
5.6.400.0080.00314.73
5.6.390.0150.00014.52
5.6.380.0000.01214.84
5.6.370.0100.00314.36
5.6.360.0100.00314.71
5.6.350.0090.00614.66
5.6.340.0030.00614.16
5.6.330.0070.00714.36
5.6.320.0090.00614.35
5.6.310.0070.00714.30
5.6.300.0070.00714.44
5.6.290.0030.01014.39
5.6.280.0020.04317.84
5.6.270.0090.00314.38
5.6.260.0100.00714.39
5.6.250.0040.03017.55
5.6.240.0060.03917.60
5.6.230.0070.04217.52
5.6.220.0070.04217.39
5.6.210.0100.04317.65
5.6.200.0040.04417.80
5.6.190.0050.04517.61
5.6.180.0060.04117.82
5.6.170.0050.04617.75
5.6.160.0070.04217.70
5.6.150.0080.04017.73
5.6.140.0080.02817.74
5.6.130.0050.04817.74
5.6.120.0070.04317.73
5.6.110.0060.03117.75
5.6.100.0080.03917.75
5.6.90.0100.04217.86
5.6.80.0100.04217.46
5.6.70.0100.03617.31
5.6.60.0120.03717.26
5.6.50.0050.02117.33
5.6.40.0000.02617.32
5.6.30.0030.02317.52
5.6.20.0020.02617.32
5.6.10.0030.02717.26
5.6.00.0030.02317.31
5.5.380.0000.02417.46
5.5.370.0080.03917.46
5.5.360.0100.04217.37
5.5.350.0050.04117.47
5.5.340.0020.04717.55
5.5.330.0070.04317.59
5.5.320.0100.04417.71
5.5.310.0080.04317.51
5.5.300.0060.04117.72
5.5.290.0050.04717.58
5.5.280.0090.04417.53
5.5.270.0090.04217.60
5.5.260.0030.04617.58
5.5.250.0100.03317.42
5.5.240.0080.04217.43
5.5.230.0080.02417.32
5.5.220.0050.02517.27
5.5.210.0050.03217.28
5.5.200.0080.01917.34
5.5.190.0070.03717.28
5.5.180.0020.03717.26
5.5.170.0030.01014.31
5.5.160.0030.02217.23
5.5.150.0030.03217.34
5.5.140.0060.03917.23
5.5.130.0050.04017.17
5.5.120.0060.04017.36
5.5.110.0080.02317.35
5.5.100.0080.03217.20
5.5.90.0060.02617.28
5.5.80.0030.03017.39
5.5.70.0050.02917.10
5.5.60.0020.02717.22
5.5.50.0060.02417.42
5.5.40.0070.02717.02
5.5.30.0050.02317.29
5.5.20.0030.02617.20
5.5.10.0070.02017.11
5.5.00.0050.02717.24
5.4.450.0070.04515.38
5.4.440.0010.03615.29
5.4.430.0030.04015.29
5.4.420.0080.04015.30
5.4.410.0050.03815.40
5.4.400.0050.03715.15
5.4.390.0110.04015.05
5.4.380.0020.02215.14
5.4.370.0030.02215.16
5.4.360.0030.02315.00
5.4.350.0070.02215.12
5.4.340.0000.02515.16
5.4.330.0030.00911.26
5.4.320.0050.01815.03
5.4.310.0080.02515.13
5.4.300.0060.03515.20
5.4.290.0020.02715.10
5.4.280.0020.04615.08
5.4.270.0060.03615.29
5.4.260.0050.01915.11
5.4.250.0050.02515.03
5.4.240.0050.03115.09
5.4.230.0020.02615.09
5.4.220.0060.02115.00
5.4.210.0080.02014.94
5.4.200.0080.01615.07
5.4.190.0020.02514.93
5.4.180.0040.02015.12
5.4.170.0050.02115.16
5.4.160.0020.03015.15
5.4.150.0020.02515.10
5.4.140.0050.03313.75
5.4.130.0070.01713.95
5.4.120.0020.02513.82
5.4.110.0020.02313.76
5.4.100.0060.01713.74
5.4.90.0050.02313.88
5.4.80.0010.02113.75
5.4.70.0050.02113.91
5.4.60.0030.02313.77
5.4.50.0080.02013.83
5.4.40.0080.02613.72
5.4.30.0030.02813.66
5.4.20.0030.04113.74
5.4.10.0060.03513.70
5.4.00.0100.03313.46
5.3.290.0030.04012.88
5.3.280.0050.02312.85
5.3.270.0070.02012.82
5.3.260.0030.02112.87
5.3.250.0040.02212.87
5.3.240.0040.02012.78
5.3.230.0030.02012.77
5.3.220.0020.02512.81
5.3.210.0050.02812.76
5.3.200.0070.01812.77
5.3.190.0060.01812.79
5.3.180.0040.02112.84
5.3.170.0030.02012.85
5.3.160.0040.02012.82
5.3.150.0030.02012.79
5.3.140.0050.03212.83
5.3.130.0020.02612.82
5.3.120.0100.02812.83
5.3.110.0070.03812.78
5.3.100.0110.03312.56
5.3.90.0030.04512.51
5.3.80.0020.03912.52
5.3.70.0050.03512.54
5.3.60.0080.03512.57
5.3.50.0060.03012.47
5.3.40.0050.04012.50
5.3.30.0050.03512.53
5.3.20.0060.03612.37
5.3.10.0020.04212.34
5.3.00.0090.03512.36
5.2.170.0100.05311.34
5.2.160.0100.05711.34
5.2.150.0000.06711.34
5.2.140.0100.06011.34
5.2.130.0070.05711.34
5.2.120.0070.06311.34
5.2.110.0070.06011.34
5.2.100.0100.05711.34
5.2.90.0030.06011.34
5.2.80.0000.06711.34
5.2.70.0070.05711.34
5.2.60.0100.05011.34
5.2.50.0030.06311.34
5.2.40.0130.05011.34
5.2.30.0070.05711.34
5.2.20.0070.05711.34
5.2.10.0030.05711.34
5.2.00.0030.06311.34
5.1.60.0000.03311.34
5.1.50.0030.04711.34
5.1.40.0030.03311.34
5.1.30.0030.05011.34
5.1.20.0130.05011.34
5.1.10.0070.04011.34
5.1.00.0030.05711.34
5.0.50.0030.04711.34
5.0.40.0070.04311.34
5.0.30.0000.07011.34
5.0.20.0000.04011.34
5.0.10.0070.03311.34
5.0.00.0070.06311.34
4.4.90.0030.03311.34
4.4.80.0070.03011.34
4.4.70.0030.03311.34
4.4.60.0100.02311.34
4.4.50.0000.03711.34
4.4.40.0000.06011.34
4.4.30.0070.03011.34
4.4.20.0000.03711.34
4.4.10.0030.03311.34
4.4.00.0000.05711.34
4.3.110.0070.03311.34
4.3.100.0000.04011.34
4.3.90.0030.03011.34
4.3.80.0000.04311.34
4.3.70.0070.03011.34
4.3.60.0070.02011.34
4.3.50.0030.03311.34
4.3.40.0000.05311.34
4.3.30.0000.03711.34
4.3.20.0030.03311.34
4.3.10.0000.03711.34
4.3.00.0070.03311.34

preferences:
44.03 ms | 401 KiB | 5 Q