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) ) $array[$key]= bebe($value); } return(object) $array; } $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.0100.01018.52
8.3.50.0120.00821.09
8.3.40.0040.01118.79
8.3.30.0070.00720.29
8.3.20.0060.00320.16
8.3.10.0090.00021.95
8.3.00.0080.00022.45
8.2.180.0060.01318.41
8.2.170.0110.01122.96
8.2.160.0040.01122.21
8.2.150.0030.00624.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0000.00820.84
8.2.110.0030.00722.26
8.2.100.0040.00817.97
8.2.90.0060.00619.20
8.2.80.0000.00817.97
8.2.70.0030.00617.63
8.2.60.0000.00817.93
8.2.50.0030.00618.10
8.2.40.0000.00818.21
8.2.30.0050.00219.45
8.2.20.0060.00317.71
8.2.10.0000.00917.90
8.2.00.0000.00717.84
8.1.280.0070.01325.92
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.56
8.1.230.0040.00717.83
8.1.220.0060.00617.78
8.1.210.0080.00018.77
8.1.200.0040.00417.25
8.1.190.0040.00417.22
8.1.180.0030.00518.10
8.1.170.0000.00818.43
8.1.160.0000.01018.96
8.1.150.0000.00918.60
8.1.140.0000.00817.52
8.1.130.0070.00017.84
8.1.120.0080.00017.49
8.1.110.0000.00717.46
8.1.100.0070.00017.38
8.1.90.0040.00417.48
8.1.80.0040.00317.54
8.1.70.0040.00417.47
8.1.60.0030.00617.56
8.1.50.0000.00717.44
8.1.40.0040.00417.51
8.1.30.0060.00317.69
8.1.20.0050.00317.64
8.1.10.0030.00617.63
8.1.00.0040.00417.61
8.0.300.0060.00318.77
8.0.290.0030.00516.75
8.0.280.0000.00818.44
8.0.270.0070.00017.29
8.0.260.0000.00716.91
8.0.250.0070.00016.94
8.0.240.0040.00417.06
8.0.230.0030.00316.93
8.0.220.0050.00217.01
8.0.210.0040.00416.87
8.0.200.0000.00717.00
8.0.190.0050.00317.11
8.0.180.0040.00416.99
8.0.170.0080.00017.04
8.0.160.0070.00016.95
8.0.150.0040.00416.84
8.0.140.0040.00416.94
8.0.130.0030.00313.35
8.0.120.0080.00016.84
8.0.110.0000.00816.98
8.0.100.0080.00016.85
8.0.90.0030.00516.91
8.0.80.0070.01017.00
8.0.70.0070.00016.98
8.0.60.0000.00816.88
8.0.50.0050.00216.78
8.0.30.0080.01017.26
8.0.20.0150.00717.40
8.0.10.0040.00417.12
8.0.00.0140.00616.71
7.4.330.0030.00316.79
7.4.320.0060.00016.63
7.4.300.0000.00616.65
7.4.290.0030.00316.46
7.4.280.0070.00016.55
7.4.270.0000.00716.63
7.4.260.0030.00313.29
7.4.250.0030.00616.42
7.4.240.0000.00716.59
7.4.230.0000.00816.52
7.4.220.0070.01016.66
7.4.210.0100.00616.62
7.4.200.0070.00016.75
7.4.190.0000.00716.71
7.4.160.0070.01016.50
7.4.150.0110.00717.40
7.4.140.0120.00817.86
7.4.130.0080.01216.55
7.4.120.0140.00316.53
7.4.110.0140.00316.51
7.4.100.0120.00916.48
7.4.90.0170.00516.68
7.4.80.0060.01319.39
7.4.70.0100.00716.69
7.4.60.0060.01216.55
7.4.50.0030.00516.51
7.4.40.0070.01022.77
7.4.30.0060.01316.52
7.4.00.0080.00815.02
7.3.330.0050.00013.40
7.3.320.0050.00013.39
7.3.310.0000.00716.21
7.3.300.0030.00316.38
7.3.290.0100.00616.41
7.3.280.0110.00516.36
7.3.270.0080.01117.40
7.3.260.0080.00916.32
7.3.250.0070.01016.49
7.3.240.0180.00616.68
7.3.230.0080.00816.40
7.3.210.0060.01116.47
7.3.200.0060.01119.39
7.3.190.0090.00916.58
7.3.180.0030.01516.61
7.3.170.0040.01416.51
7.3.160.0110.00516.41
7.3.120.0050.01214.97
7.3.110.0110.00714.88
7.3.100.0000.01315.00
7.3.90.0070.01015.10
7.3.80.0090.00614.89
7.3.70.0000.01114.90
7.3.60.0060.00914.64
7.3.50.0060.00914.73
7.3.40.0120.00414.67
7.3.30.0070.01014.95
7.3.20.0070.01016.55
7.3.10.0100.00316.54
7.3.00.0050.00816.69
7.2.330.0110.00816.82
7.2.320.0070.01016.61
7.2.310.0120.00616.81
7.2.300.0100.01016.50
7.2.290.0060.01216.75
7.2.250.0090.00915.07
7.2.240.0040.01515.02
7.2.230.0100.00615.02
7.2.220.0130.00715.20
7.2.210.0040.00715.05
7.2.200.0060.00615.08
7.2.190.0080.00415.05
7.2.180.0090.00315.16
7.2.170.0070.01115.08
7.2.130.0080.00816.90
7.2.120.0080.00717.06
7.2.110.0040.01216.89
7.2.100.0050.00917.11
7.2.90.0060.00816.97
7.2.80.0020.01316.80
7.2.70.0060.01017.06
7.2.60.0070.00916.87
7.2.50.0080.00816.68
7.2.40.0020.01017.01
7.2.30.0070.00816.88
7.2.20.0080.00816.77
7.2.10.0070.00816.88
7.2.00.0040.01017.74
7.1.330.0030.01315.47
7.1.320.0030.01215.92
7.1.310.0080.00415.90
7.1.300.0070.00715.44
7.1.290.0070.01115.82
7.1.280.0070.00715.82
7.1.270.0120.00315.87
7.1.260.0040.00715.98
7.1.250.0030.01215.86
7.1.240.0030.00715.60
7.1.230.0030.00915.85
7.1.220.0100.00315.94
7.1.210.0030.01015.64
7.1.200.0080.00615.82
7.1.190.0040.01115.88
7.1.180.0000.01415.94
7.1.170.0000.01115.56
7.1.160.0100.00315.62
7.1.150.0060.00615.80
7.1.140.0070.00415.61
7.1.130.0060.00615.83
7.1.120.0000.01115.77
7.1.110.0000.01015.97
7.1.100.0030.00817.03
7.1.90.0030.00615.79
7.1.80.0030.01015.94
7.1.70.0000.01416.42
7.1.60.0100.00817.45
7.1.50.0080.01116.44
7.1.40.0070.00715.93
7.1.30.0080.00315.84
7.1.20.0040.00715.82
7.1.10.0030.01015.54
7.1.00.0060.03719.08
7.0.330.0100.00315.42
7.0.320.0030.00715.40
7.0.310.0080.00615.34
7.0.300.0130.00315.21
7.0.290.0080.00415.42
7.0.280.0070.00415.45
7.0.270.0110.00315.46
7.0.260.0040.00815.24
7.0.250.0030.01215.62
7.0.240.0040.00715.39
7.0.230.0060.00615.26
7.0.220.0110.00415.55
7.0.210.0040.00415.59
7.0.200.0050.00515.96
7.0.190.0090.00615.47
7.0.180.0030.00915.50
7.0.170.0100.00315.55
7.0.160.0070.00715.38
7.0.150.0120.00015.57
7.0.140.0020.04318.78
7.0.130.0030.00715.52
7.0.120.0030.01015.50
7.0.110.0090.00315.56
7.0.100.0050.02317.73
7.0.90.0050.02817.74
7.0.80.0070.02317.75
7.0.70.0050.02517.79
7.0.60.0020.02817.63
7.0.50.0060.02618.06
7.0.40.0050.02616.72
7.0.30.0070.03216.76
7.0.20.0040.02916.71
7.0.10.0060.02216.78
7.0.00.0080.02216.77
5.6.380.0030.01014.38
5.6.370.0070.00714.32
5.6.360.0070.00714.30
5.6.350.0040.00814.39
5.6.340.0040.01114.09
5.6.330.0040.01114.32
5.6.320.0040.01114.18
5.6.310.0040.01114.45
5.6.300.0040.00714.54
5.6.290.0060.00314.17
5.6.280.0060.03817.90
5.6.270.0100.00314.49
5.6.260.0000.01014.89
5.6.250.0070.02817.62
5.6.240.0050.02317.48
5.6.230.0050.02617.43
5.6.220.0030.02317.64
5.6.210.0050.01817.40
5.6.200.0110.01917.81
5.6.190.0020.02217.87
5.6.180.0020.02517.82
5.6.170.0050.02017.67
5.6.160.0040.02417.88
5.6.150.0070.02417.65
5.6.140.0070.03717.75
5.6.130.0060.02217.75
5.6.120.0050.03417.78
5.6.110.0020.04017.87
5.6.100.0070.04417.70
5.6.90.0100.02017.79
5.6.80.0050.04517.35
5.6.70.0010.04617.48
5.6.60.0090.03117.49
5.6.50.0020.05017.40
5.6.40.0080.04117.43
5.6.30.0050.02017.35
5.6.20.0040.02517.48
5.6.10.0040.02517.41
5.6.00.0030.04617.39
5.5.380.0070.01916.01
5.5.370.0030.02815.87
5.5.360.0050.02016.10
5.5.350.0050.02515.94
5.5.340.0050.02016.06
5.5.330.0090.01816.03
5.5.320.0020.02416.17
5.5.310.0050.02416.20
5.5.300.0040.02316.15
5.5.290.0050.03316.21
5.5.280.0070.02716.16
5.5.270.0070.04115.97
5.5.260.0040.02516.00
5.5.250.0050.04115.94
5.5.240.0070.03315.71
5.5.230.0060.02815.80
5.5.220.0060.04415.85
5.5.210.0030.02415.70
5.5.200.0050.04115.71
5.5.190.0060.04315.70
5.5.180.0030.04415.83
5.5.170.0060.00611.37
5.5.160.0080.02115.72
5.5.150.0050.04615.68
5.5.140.0040.02215.73
5.5.130.0080.03615.71
5.5.120.0030.04515.78
5.5.110.0060.04115.78
5.5.100.0070.03315.68
5.5.90.0070.03715.63
5.5.80.0040.04115.67
5.5.70.0080.03215.72
5.5.60.0080.03515.79
5.5.50.0100.03515.60
5.5.40.0030.02315.67
5.5.30.0030.04415.71
5.5.20.0070.04015.65
5.5.10.0020.02415.66
5.5.00.0010.02815.58
5.4.450.0090.02615.33
5.4.440.0050.04015.49
5.4.430.0070.04015.40
5.4.420.0140.01215.34
5.4.410.0050.02015.24
5.4.400.0050.01815.04
5.4.390.0050.04015.17
5.4.380.0080.03915.25
5.4.370.0020.03015.04
5.4.360.0040.04015.22
5.4.350.0030.03915.17
5.4.340.0030.03615.19
5.4.330.0070.00411.18
5.4.320.0080.04015.19
5.4.310.0050.03715.21
5.4.300.0050.04215.22
5.4.290.0030.02115.15
5.4.280.0050.04015.14
5.4.270.0030.04315.14
5.4.260.0050.04315.16
5.4.250.0080.03515.11
5.4.240.0000.03815.25
5.4.230.0100.03515.18
5.4.220.0070.03915.24
5.4.210.0100.02715.07
5.4.200.0000.02515.20
5.4.190.0050.04115.01
5.4.180.0060.04015.15
5.4.170.0060.03515.19
5.4.160.0070.04215.25
5.4.150.0050.03315.27
5.4.140.0030.04313.83
5.4.130.0050.03413.85
5.4.120.0030.03413.88
5.4.110.0100.03513.79
5.4.100.0070.03513.86
5.4.90.0050.04014.02
5.4.80.0080.03913.74
5.4.70.0070.01813.91
5.4.60.0030.03713.86
5.4.50.0040.03213.83
5.4.40.0070.03713.92
5.4.30.0070.04313.90
5.4.20.0080.04013.89
5.4.10.0040.03013.78
5.4.00.0080.03713.57
5.3.290.0050.01912.94
5.3.280.0000.02812.96
5.3.270.0020.02312.90
5.3.260.0030.04212.93
5.3.250.0060.03912.96
5.3.240.0100.03712.94
5.3.230.0050.04512.91
5.3.220.0030.04012.93
5.3.210.0040.03612.85
5.3.200.0050.04012.86
5.3.190.0020.02612.93
5.3.180.0030.04112.88
5.3.170.0070.03712.85
5.3.160.0070.03012.86
5.3.150.0040.03412.92
5.3.140.0060.03812.83
5.3.130.0020.04412.92
5.3.120.0030.03512.87
5.3.110.0030.02512.85
5.3.100.0050.04212.64
5.3.90.0020.02812.60
5.3.80.0080.03612.59
5.3.70.0030.04312.59
5.3.60.0050.02312.55
5.3.50.0020.02812.59
5.3.40.0070.01712.57
5.3.30.0030.02412.54
5.3.20.0000.03512.43
5.3.10.0050.03612.44
5.3.00.0030.02612.37
5.2.170.0020.02012.03
5.2.160.0040.01712.03
5.2.150.0060.02612.03
5.2.140.0050.01812.03
5.2.130.0030.02112.03
5.2.120.0040.01812.03
5.2.110.0000.01912.03
5.2.100.0030.02012.03
5.2.90.0050.03312.03
5.2.80.0050.01812.03
5.2.70.0070.03512.03
5.2.60.0080.03012.03
5.2.50.0070.03112.03
5.2.40.0000.03712.03
5.2.30.0030.01712.03
5.2.20.0030.02012.03
5.2.10.0050.02812.03
5.2.00.0070.02412.03
5.1.60.0020.02912.03
5.1.50.0020.02012.03
5.1.40.0040.02012.03
5.1.30.0000.03112.03
5.1.20.0020.01912.03
5.1.10.0090.02312.03
5.1.00.0020.03012.03
5.0.50.0020.01312.03
5.0.40.0030.01512.03
5.0.30.0060.03012.03
5.0.20.0050.02012.03
5.0.10.0030.02312.03
5.0.00.0040.03812.03
4.4.90.0030.00812.03
4.4.80.0030.02012.03
4.4.70.0020.01812.03
4.4.60.0030.01812.03
4.4.50.0020.02012.03
4.4.40.0020.02412.03
4.4.30.0030.02012.03
4.4.20.0020.01912.03
4.4.10.0020.01512.03
4.4.00.0030.02912.03
4.3.110.0050.00712.03
4.3.100.0050.01712.03
4.3.90.0020.02012.03
4.3.80.0020.02012.03
4.3.70.0000.01312.03
4.3.60.0050.01512.03
4.3.50.0000.01312.03
4.3.40.0020.02512.03
4.3.30.0020.01812.03
4.3.20.0000.02412.03
4.3.10.0030.01612.03
4.3.00.0000.01412.03

preferences:
44.24 ms | 401 KiB | 5 Q